by travisgriggs · 4y ago · 0 comments
It seems they’re talking about Instants with different resolutions.
My answers are no, no, and yes.
If we see what they’re calling date as integers and times as floats, the questions become
Is 4 equal to 4.5? No
Is 4 between 4.5 and 200.5? No
Is 4.5 after 4? Yes
Is today lunch and a few months from now? No, but also yes. Parts of today are, but the entire "today" isn't within that window.
Is today's lunch after today? No! It's during today, not tomorrow or some other future day. But also yes! Lunch happens after the calendar has flipped to today.
So we got Instants, Calendar Objects ("days", "weeks", etc), Durations, etc. Depending on context you could want some set operators to determine unions and intersections, or maybe you want simple numeric operators.
- what is assumed as "today" was a range and the fact that the question is asked is a sign something got really wrong down the chain. So the question has no answer.
- it is assumed that "today" is a time. If the exact time value existed but was cut off at some point, we're again in a "no answer" situation. The only way this can be answered is if the date is implicitly a time at midnight.
To me too, the only proper answer is "no,no,yes" and any other context is a "what happened?"
"2022-02-12" is not always implicitly a representation of "2022-02-12 00:00:00".
Sometimes granularity is omitted because it is zero, and sometimes granularity is omitted because it doesn't exist.
(and sometimes granularity that doesn't exist is represented as zero due to encoding limitations/mistakes).
And that is not even getting into what a day means when you are trying to coordinate between NZ and the UK.