Liking cljdoc? Tell your friends :D

jdk.time.zone.ZoneOffsetTransition

A transition between two offsets caused by a discontinuity in the local time-line.

A transition between two offsets is normally the result of a daylight savings cutover. The discontinuity is normally a gap in spring and an overlap in autumn. ZoneOffsetTransition models the transition between the two offsets.

Gaps occur where there are local date-times that simply do not exist. An example would be when the offset changes from +03:00 to +04:00. This might be described as 'the clocks will move forward one hour tonight at 1am'.

Overlaps occur where there are local date-times that exist twice. An example would be when the offset changes from +04:00 to +03:00. This might be described as 'the clocks will move back one hour tonight at 2am'.

A transition between two offsets caused by a discontinuity in the local time-line.

A transition between two offsets is normally the result of a daylight savings cutover.
The discontinuity is normally a gap in spring and an overlap in autumn.
ZoneOffsetTransition models the transition between the two offsets.

Gaps occur where there are local date-times that simply do not exist.
An example would be when the offset changes from +03:00 to +04:00.
This might be described as 'the clocks will move forward one hour tonight at 1am'.

Overlaps occur where there are local date-times that exist twice.
An example would be when the offset changes from +04:00 to +03:00.
This might be described as 'the clocks will move back one hour tonight at 2am'.
raw docstring

*ofclj

(*of transition offset-before offset-after)

Obtains an instance defining a transition between two offsets.

Applications should normally obtain an instance from ZoneRules. This factory is only intended for use when creating ZoneRules.

transition - the transition date-time at the transition, which never actually occurs, expressed local to the before offset, not null - java.time.LocalDateTime offset-before - the offset before the transition, not null - java.time.ZoneOffset offset-after - the offset at and after the transition, not null - java.time.ZoneOffset

returns: the transition, not null - java.time.zone.ZoneOffsetTransition

throws: java.lang.IllegalArgumentException - if offsetBefore and offsetAfter are equal, or transition.getNano() returns non-zero value

Obtains an instance defining a transition between two offsets.

 Applications should normally obtain an instance from ZoneRules.
 This factory is only intended for use when creating ZoneRules.

transition - the transition date-time at the transition, which never actually occurs, expressed local to the before offset, not null - `java.time.LocalDateTime`
offset-before - the offset before the transition, not null - `java.time.ZoneOffset`
offset-after - the offset at and after the transition, not null - `java.time.ZoneOffset`

returns: the transition, not null - `java.time.zone.ZoneOffsetTransition`

throws: java.lang.IllegalArgumentException - if offsetBefore and offsetAfter are equal, or transition.getNano() returns non-zero value
raw docstring

compare-toclj

(compare-to this transition)

Compares this transition to another based on the transition instant.

This compares the instants of each transition. The offsets are ignored, making this order inconsistent with equals.

transition - the transition to compare to, not null - java.time.zone.ZoneOffsetTransition

returns: the comparator value, negative if less, positive if greater - int

Compares this transition to another based on the transition instant.

 This compares the instants of each transition.
 The offsets are ignored, making this order inconsistent with equals.

transition - the transition to compare to, not null - `java.time.zone.ZoneOffsetTransition`

returns: the comparator value, negative if less, positive if greater - `int`
raw docstring

equalsclj

(equals this other)

Checks if this object equals another.

The entire state of the object is compared.

other - the other object to compare to, null returns false - java.lang.Object

returns: true if equal - boolean

Checks if this object equals another.

 The entire state of the object is compared.

other - the other object to compare to, null returns false - `java.lang.Object`

returns: true if equal - `boolean`
raw docstring

gap?clj

(gap? this)

Does this transition represent a gap in the local time-line.

Gaps occur where there are local date-times that simply do not exist. An example would be when the offset changes from +01:00 to +02:00. This might be described as 'the clocks will move forward one hour tonight at 1am'.

returns: true if this transition is a gap, false if it is an overlap - boolean

Does this transition represent a gap in the local time-line.

 Gaps occur where there are local date-times that simply do not exist.
 An example would be when the offset changes from +01:00 to +02:00.
 This might be described as 'the clocks will move forward one hour tonight at 1am'.

returns: true if this transition is a gap, false if it is an overlap - `boolean`
raw docstring

get-date-time-afterclj

(get-date-time-after this)

Gets the local transition date-time, as would be expressed with the 'after' offset.

This is the first date-time after the discontinuity, when the new offset applies.

The combination of the 'before' date-time and offset represents the same instant as the 'after' date-time and offset.

returns: the transition date-time expressed with the after offset, not null - java.time.LocalDateTime

Gets the local transition date-time, as would be expressed with the 'after' offset.

 This is the first date-time after the discontinuity, when the new offset applies.

 The combination of the 'before' date-time and offset represents the same instant
 as the 'after' date-time and offset.

returns: the transition date-time expressed with the after offset, not null - `java.time.LocalDateTime`
raw docstring

get-date-time-beforeclj

(get-date-time-before this)

Gets the local transition date-time, as would be expressed with the 'before' offset.

This is the date-time where the discontinuity begins expressed with the 'before' offset. At this instant, the 'after' offset is actually used, therefore the combination of this date-time and the 'before' offset will never occur.

The combination of the 'before' date-time and offset represents the same instant as the 'after' date-time and offset.

returns: the transition date-time expressed with the before offset, not null - java.time.LocalDateTime

Gets the local transition date-time, as would be expressed with the 'before' offset.

 This is the date-time where the discontinuity begins expressed with the 'before' offset.
 At this instant, the 'after' offset is actually used, therefore the combination of this
 date-time and the 'before' offset will never occur.

 The combination of the 'before' date-time and offset represents the same instant
 as the 'after' date-time and offset.

returns: the transition date-time expressed with the before offset, not null - `java.time.LocalDateTime`
raw docstring

get-durationclj

(get-duration this)

Gets the duration of the transition.

In most cases, the transition duration is one hour, however this is not always the case. The duration will be positive for a gap and negative for an overlap. Time-zones are second-based, so the nanosecond part of the duration will be zero.

returns: the duration of the transition, positive for gaps, negative for overlaps - java.time.Duration

Gets the duration of the transition.

 In most cases, the transition duration is one hour, however this is not always the case.
 The duration will be positive for a gap and negative for an overlap.
 Time-zones are second-based, so the nanosecond part of the duration will be zero.

returns: the duration of the transition, positive for gaps, negative for overlaps - `java.time.Duration`
raw docstring

get-instantclj

(get-instant this)

Gets the transition instant.

This is the instant of the discontinuity, which is defined as the first instant that the 'after' offset applies.

The methods getInstant(), getDateTimeBefore() and getDateTimeAfter() all represent the same instant.

returns: the transition instant, not null - java.time.Instant

Gets the transition instant.

 This is the instant of the discontinuity, which is defined as the first
 instant that the 'after' offset applies.

 The methods getInstant(), getDateTimeBefore() and getDateTimeAfter()
 all represent the same instant.

returns: the transition instant, not null - `java.time.Instant`
raw docstring

get-offset-afterclj

(get-offset-after this)

Gets the offset after the transition.

This is the offset in use on and after the instant of the transition.

returns: the offset after the transition, not null - java.time.ZoneOffset

Gets the offset after the transition.

 This is the offset in use on and after the instant of the transition.

returns: the offset after the transition, not null - `java.time.ZoneOffset`
raw docstring

get-offset-beforeclj

(get-offset-before this)

Gets the offset before the transition.

This is the offset in use before the instant of the transition.

returns: the offset before the transition, not null - java.time.ZoneOffset

Gets the offset before the transition.

 This is the offset in use before the instant of the transition.

returns: the offset before the transition, not null - `java.time.ZoneOffset`
raw docstring

hash-codeclj

(hash-code this)

Returns a suitable hash code.

returns: the hash code - int

Returns a suitable hash code.

returns: the hash code - `int`
raw docstring

overlap?clj

(overlap? this)

Does this transition represent an overlap in the local time-line.

Overlaps occur where there are local date-times that exist twice. An example would be when the offset changes from +02:00 to +01:00. This might be described as 'the clocks will move back one hour tonight at 2am'.

returns: true if this transition is an overlap, false if it is a gap - boolean

Does this transition represent an overlap in the local time-line.

 Overlaps occur where there are local date-times that exist twice.
 An example would be when the offset changes from +02:00 to +01:00.
 This might be described as 'the clocks will move back one hour tonight at 2am'.

returns: true if this transition is an overlap, false if it is a gap - `boolean`
raw docstring

to-epoch-secondclj

(to-epoch-second this)

Gets the transition instant as an epoch second.

returns: the transition epoch second - long

Gets the transition instant as an epoch second.

returns: the transition epoch second - `long`
raw docstring

to-stringclj

(to-string this)

Returns a string describing this object.

returns: a string for debugging, not null - java.lang.String

Returns a string describing this object.

returns: a string for debugging, not null - `java.lang.String`
raw docstring

valid-offset?clj

(valid-offset? this offset)

Checks if the specified offset is valid during this transition.

This checks to see if the given offset will be valid at some point in the transition. A gap will always return false. An overlap will return true if the offset is either the before or after offset.

offset - the offset to check, null returns false - java.time.ZoneOffset

returns: true if the offset is valid during the transition - boolean

Checks if the specified offset is valid during this transition.

 This checks to see if the given offset will be valid at some point in the transition.
 A gap will always return false.
 An overlap will return true if the offset is either the before or after offset.

offset - the offset to check, null returns false - `java.time.ZoneOffset`

returns: true if the offset is valid during the transition - `boolean`
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close