Hacker News new | ask | show | jobs
by happytoexplain 1589 days ago
"4" is, in most contexts, implicitly a representation of "4.0".

"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).

1 comments

My intuition is that a "date" is a bounded range of times 24 hours long. So we should speak about dates containing times, or dates subsetting, supersetting, or intersecting other time ranges.
Um, add in a daylight savings transition and that "date" could be 23 or 25 hours long.

And that is not even getting into what a day means when you are trying to coordinate between NZ and the UK.

To really get confusing, let's add in leap seconds. They're added "as needed" and it looks like our most recent one was in 2016.

https://en.wikipedia.org/wiki/Leap_second

Good point! ISO 8601 dates should support timezones. Then a 24-hour "date" could only be in one of standard time or daylight time.