Home Reference Source Repository
import {SystemDefaultZoneRules} from 'js-joda/src/zone/SystemDefaultZoneRules.js'
public class | source

SystemDefaultZoneRules

Extends:

ZoneRules → SystemDefaultZoneRules

Method Summary

Public Methods
public

equals(other: *): boolean

public
public
public
public

This implementation is NOT returning the best value in a gap or overlap situation as specified at ZoneRules.offsetOfLocalDateTime.

public

Inherited Summary

From class ZoneRules
public static

of(offset: ZoneOffset): ZoneRules

Obtains an instance of {@code ZoneRules} that always uses the same offset.

public

Checks of the zone rules are fixed, such that the offset never varies.

public

isValidOffset(localDateTime: LocalDateTime, offset: ZoneOffset): boolean

Checks if the offset date-time is valid for these rules.

public

offset(instantOrLocalDateTime: *): ZoneOffset

public

Gets the offset applicable at the specified instant in these rules.

public

Gets a suitable offset for the specified local date-time in these rules.

Public Methods

public equals(other: *): boolean source

Params:

NameTypeAttributeDescription
other *

Return:

boolean

public isFixedOffset(): boolean source

Override:

ZoneRules#isFixedOffset

Return:

boolean

public isValidOffset(dateTime: LocalDateTime, offset: ZoneOffset): boolean source

Override:

ZoneRules#isValidOffset

Params:

NameTypeAttributeDescription
dateTime LocalDateTime
offset ZoneOffset

Return:

boolean

public offsetOfInstant(instant: Instant): ZoneOffset source

Override:

ZoneRules#offsetOfInstant

Params:

NameTypeAttributeDescription
instant Instant

Return:

ZoneOffset

public offsetOfLocalDateTime(localDateTime: LocalDateTime): ZoneOffset source

This implementation is NOT returning the best value in a gap or overlap situation as specified at ZoneRules.offsetOfLocalDateTime.

The calculated offset depends Date.prototype.getTimezoneOffset and its not specified at the ECMA-262 specification how to handle daylight savings gaps/ overlaps.

The Chrome Browser version 49 is returning the next transition offset in a gap/overlap situation, other browsers/ engines might do it in the same way.

Override:

ZoneRules#offsetOfLocalDateTime

Params:

NameTypeAttributeDescription
localDateTime LocalDateTime

Return:

ZoneOffset

public toString(): string source

Return:

string