You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 18, 2023. It is now read-only.
Default DateTime.Compare ignores the Kind property. We should:
Add a new guard, KindSpecified, to require a DateTime argument to have kind that is either Local or Utc, so people can force callers to think about the source of their time values and specify the kinds explicitly.
Add non-generic overloads to Equal, NotEqual, Min, Max and InRange that accept DateTime arguments and throw if (a.Kind == Unspecified) != (b.Kind == Unspecified) (DateTime already accounts for the time difference when comparing Local values to Utc values).
The second bullet is a breaking change, so I'm adding this to the 2.0 milestone.