|
|
|
|
|
by NateEag
1589 days ago
|
|
Caveat: The date's range isn't always 24 hours exactly. Leap seconds can make it slightly longer. A daylight savings change makes the date's range 23 or 25 hours, depending on the direction. I would not be surprised if someone popped up with more edge cases I haven't thought of. Dates and times are crazy. |
|
For example, in the domain of financial settlement, a future date of 2022-03-03 would imply that the event must happen by the end of business day of 2022-03-03 (and thus an event at 23:00 of 2022-03-03 would be too late and would map to 2022-03-04 instead); and in a similar manner, the appropriate date for any events happening in the middle of a sunday would be either monday or friday depending on what your rules are, as the effective date which you would be using to calculate the number of days between two events (for e.g. interest) in may jurisdictions has to be a business day; so two events timpestamped five minutes apart might need to be treated as if they are on the same day, different days, or in some cases many days apart (e.g. with a combination of Christmas + weekend).
Different domains will have different rules; the generic concept of "date" is too vague to define an universal comparison operator and you have to look at the meaning of each specific date field/variable and expect different date fields/variables to need different semantics.