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
The implementation of Ord for Date assumes that the Calendars of the inputs date are the same.
This isn't a terrible assumption, since the Date constructor doesn't currently allow the creation of overlapping dates in different calendars, and Dates are immutable. Still, we shouldn't lose sight of this as the API evolves.
To do this properly, in the situation where we're comparing a Gregorian date with a date in either of the Julian calendars, we'd need a function to check whether the Julian calendar date is 14 days or less ahead of a Gregorian date, and adjust the return value of Ord accordingly.
The text was updated successfully, but these errors were encountered:
The implementation of
Ord
forDate
assumes that theCalendar
s of the inputs date are the same.This isn't a terrible assumption, since the
Date
constructor doesn't currently allow the creation of overlapping dates in different calendars, andDate
s are immutable. Still, we shouldn't lose sight of this as the API evolves.To do this properly, in the situation where we're comparing a Gregorian date with a date in either of the Julian calendars, we'd need a function to check whether the Julian calendar date is 14 days or less ahead of a Gregorian date, and adjust the return value of
Ord
accordingly.The text was updated successfully, but these errors were encountered: