Beispiel #1
0
 /// <inheritdoc />
 public override bool Equals(OffsetDateTime x, OffsetDateTime y) =>
 x.ToElapsedTimeSinceEpoch() == y.ToElapsedTimeSinceEpoch();
Beispiel #2
0
 /// <inheritdoc />
 public override int GetHashCode(OffsetDateTime obj) => obj.ToElapsedTimeSinceEpoch().GetHashCode();
Beispiel #3
0
 /// <inheritdoc />
 public override int Compare(OffsetDateTime x, OffsetDateTime y) =>
 // TODO(optimization): Optimize cases which are more than 2 days apart, by avoiding the arithmetic?
 x.ToElapsedTimeSinceEpoch().CompareTo(y.ToElapsedTimeSinceEpoch());