Enum ZoneEqualityComparer.Options
Namespace: NodaTime .TimeZones
Assembly: NodaTime.dll
Syntax
[Flags]
public enum ZoneEqualityComparer.Options
Remarks
By default, the comparer only compares the wall offset (total of standard offset and any daylight saving offset)
at every instant within the interval over which the comparer operates. In practice, this is done by comparing each
Zone
It's possible for a time zone to have a transition from one ZoneInterval
to another which doesn't adjust the offset: it
might just change the name, or the balance between standard offset to daylight saving offset. (As an example, at midnight local
time on October 27th 1968, the Europe/London time zone went from a standard offset of 0 and a daylight saving offset of 1 hour
to a standard offset of 1 and a daylight saving offset of 0... which left the clocks unchanged.) This transition is irrelevant
to the default options, so the two zone intervals involved are effectively coalesced.
The options available change what sort of comparison is performed - which can also change which zone intervals can be coalesced. For
example, by specifying just the Match
Similarly, the Match
Fields
Name | Description |
---|---|
MatchAllTransitions | This option prevents adjacent zone intervals from being coalesced, even if they are otherwise considered equivalent according to other options. |
MatchNames | Compare the names of zone intervals as well as offsets. |
MatchOffsetComponents | Instead of only comparing wall offsets, the standard/savings split is also considered. So when this option is used, two zones which both have a wall offset of +2 at one instant would be considered unequal if one of those offsets was +1 standard, +1 savings and the other was +2 standard with no daylight saving. |
MatchStartAndEndTransitions | Includes the transitions into the first zone interval and out of the last zone interval as part of the comparison, even if they do not affect the offset or name for any instant within the operating interval. |
OnlyMatchWallOffset | The default comparison, which only cares about the wall offset at any particular
instant, within the interval of the comparer. In other words, if Get |
StrictestMatch | The combination of all available match options. |