Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class NodaTime.​TimeZones.​ZoneInterval

Assembly: NodaTime

Inheritance: object → ZoneInterval

Implemented Interfaces

Represents a range of time for which a particular Offset applies.

Remarks

<para> Equality is defined component-wise in terms of all properties: the name, the start and end, and the offsets. There is no ordering defined between zone intervals. </para>

Properties

public Offset
StandardOffset
Gets the standard offset for this period. This is the offset without any daylight savings contributions.
Remarks This is effectively <c>WallOffset - Savings</c> .
public Duration
Duration
Gets the duration of this zone interval.
Remarks This is effectively <c>End - Start</c> .
public bool
HasStart
Returns <c>true</c> if this zone interval has a fixed start point, or <c>false</c> if it extends to the beginning of time.
public Instant
End
Gets the last Instant (exclusive) that the Offset applies.
public bool
HasEnd
Returns <c>true</c> if this zone interval has a fixed end point, or <c>false</c> if it extends to the end of time.
public LocalDateTime
IsoLocalStart
Gets the local start time of the interval, as a <see cref="T:NodaTime.LocalDateTime" /> in the ISO calendar.
public LocalDateTime
IsoLocalEnd
Gets the local end time of the interval, as a <see cref="T:NodaTime.LocalDateTime" /> in the ISO calendar.
public string
Name
Gets the name of this offset period (e.g. PST or PDT).
public Offset
WallOffset
Gets the offset from UTC for this period. This includes any daylight savings value.
public Offset
Savings
Gets the daylight savings value for this period.
public Instant
Start
Gets the first Instant that the Offset applies.

Methods

public bool
Contains​(Instant instant)
Determines whether this period contains the given Instant in its range.
Returns <c>true</c> if this period contains the given Instant in its range; otherwise, <c>false</c> .
instant The instant to test.
Remarks Usually this is half-open, i.e. the end is exclusive, but an interval with an end point of "the end of time" is deemed to be inclusive at the end.
public bool
Equals​(ZoneInterval other)
Indicates whether the current object is equal to another object of the same type. See the type documentation for a description of equality semantics.
Returns true if the current object is equal to the <paramref name="other" /> parameter; otherwise, false.
other An object to compare with this object.
public bool
Equals​(object obj)
Determines whether the specified <see cref="T:System.Object" /> is equal to the current <see cref="T:System.Object" /> . See the type documentation for a description of equality semantics.
Returns <c>true</c> if the specified <see cref="T:System.Object" /> is equal to the current <see cref="T:System.Object" /> ; otherwise, <c>false</c> .
obj The <see cref="T:System.Object" /> to compare with the current <see cref="T:System.Object" /> .
public int
GetHashCode​()
Returns a hash code for this zone interval. See the type documentation for a description of equality semantics.
Returns A hash code for this zone interval.
public string
ToString​()
Returns a <see cref="T:System.String" /> that represents this instance.
Returns A <see cref="T:System.String" /> that represents this instance.
protected void
Finalize​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object