ZoneEqualityComparer.forInterval constructor
ZoneEqualityComparer.forInterval(
- Interval interval
Returns a ZoneEqualityComparer for the given interval with the default options.
The default behaviour of this comparator is to consider two time zones to be equal if they share the same wall
offsets at all points within a given interval.
To specify non-default options, call the withOptions method on the result
of this method.
interval
: The interval over which to compare time zones. This must have both a start and an end.
Returns: A ZoneEqualityComparer for the given interval with the default options.
Implementation
factory ZoneEqualityComparer.forInterval(Interval interval) {
Preconditions.checkArgument(interval.hasStart && interval.hasEnd, 'interval',
'The interval must have both a start and an end.');
return ZoneEqualityComparer._(interval, ZoneEqualityComparerOptions.onlyMatchWallOffset);
}