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
public

equals(other: *): boolean

public
public
public
public
public
public
public

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

public
public

standardOffset(instant: *): ZoneOffset

public
public
public
public
public

validOffsets(localDateTime: *): ZoneOffset[]

Inherited Summary

From class ZoneRules
public static

of(offset: ZoneOffset): ZoneRules

Obtains an instance of ZoneRules that always uses the same offset.

public

Gets the amount of daylight savings in use for the specified instant in this zone.

public

Checks if the specified instant is in daylight savings.

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

Gets the next transition after the specified instant.

public

offset(instantOrLocalDateTime: *): ZoneOffset

public

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

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

Gets the previous transition before the specified instant.

public

Gets the standard offset for the specified instant in this zone.

public

Gets the offset transition applicable at the specified local date-time in these rules.

public

transitionRules(): ZoneOffsetTransitionRule[]

Gets the list of transition rules for years beyond those defined in the transition list.

public

Gets the complete list of fully defined transitions.

public

Gets the offset applicable at the specified local date-time in these rules.

Public Methods

public daylightSavings() source

Override:

ZoneRules#daylightSavings

Throw:

*

DateTimeException not supported

public equals(other: *): boolean source

Params:

NameTypeAttributeDescription
other *

Return:

boolean

public isDaylightSavings() source

Override:

ZoneRules#isDaylightSavings

Throw:

*

DateTimeException not supported

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 nextTransition() source

Override:

ZoneRules#nextTransition

Throw:

*

DateTimeException not supported

public offsetOfEpochMilli(epochMilli: number): ZoneOffset source

Override:

ZoneRules#offsetOfEpochMilli

Params:

NameTypeAttributeDescription
epochMilli number

Return:

ZoneOffset

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 previousTransition() source

Override:

ZoneRules#previousTransition

Throw:

*

DateTimeException not supported

public standardOffset(instant: *): ZoneOffset source

Override:

ZoneRules#standardOffset

Params:

NameTypeAttributeDescription
instant *

Return:

ZoneOffset

public toString(): string source

Return:

string

public transition(): undefined source

Override:

ZoneRules#transition

Return:

undefined

Throw:

*

DateTimeException not supported

public transitionRules() source

Override:

ZoneRules#transitionRules

Throw:

*

DateTimeException not supported

public transitions() source

Override:

ZoneRules#transitions

Throw:

*

DateTimeException not supported

public validOffsets(localDateTime: *): ZoneOffset[] source

Override:

ZoneRules#validOffsets

Params:

NameTypeAttributeDescription
localDateTime *

Return:

ZoneOffset[]