import {SystemDefaultZoneRules} from 'js-joda/src/zone/SystemDefaultZoneRules.js'
SystemDefaultZoneRules
Extends:
Method Summary
Public Methods | ||
public |
|
|
public |
|
|
public |
isValidOffset(dateTime: LocalDateTime, offset: ZoneOffset): boolean |
|
public |
offsetOfInstant(instant: Instant): ZoneOffset |
|
public |
offsetOfLocalDateTime(localDateTime: LocalDateTime): ZoneOffset 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 |
offsetOfInstant(instant: Instant): ZoneOffset Gets the offset applicable at the specified instant in these rules. |
|
public |
offsetOfLocalDateTime(localDateTime: LocalDateTime): ZoneOffset Gets a suitable offset for the specified local date-time in these rules. |
Public Methods
public isValidOffset(dateTime: LocalDateTime, offset: ZoneOffset): boolean source
Override:
ZoneRules#isValidOffsetParams:
Name | Type | Attribute | Description |
dateTime | LocalDateTime | ||
offset | ZoneOffset |
public offsetOfInstant(instant: Instant): ZoneOffset source
Override:
ZoneRules#offsetOfInstantParams:
Name | Type | Attribute | Description |
instant | Instant |
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#offsetOfLocalDateTimeParams:
Name | Type | Attribute | Description |
localDateTime | LocalDateTime |