Re:ISO-8601 date format reference not publicly available
by sixothree on Tuesday March 09, 2021 @11:09PM
(#26407658)
This is directly from the RFC this thread is about:
Date and time expressions indicate an instant in time. Description of time periods, or intervals, is not covered here.
Re:ISO-8601 date format reference not publicly available
by inopinatus on Tuesday March 09, 2021 @11:53PM
(#26407901)
Sure, but just because it skips out on practical considerations, doesn't mean the RFC is irrelevant. The standard format is still helpful even if the semantics are underspecified.
Re:ISO-8601 date format reference not publicly available
by taylodl on Tuesday March 09, 2021 @08:42PM
(#26406797)
If you find that Lambert paper then please post it and I’ll do the same. What you’re talking about is how I think of a time range or time interval.
Firstly, users tend to write them as 23:59:59 or even 23:59. When used as a query, this can skip a second or even a minute of data.
Secondly, 00:00:00.0000 can match the first moment of tomorrow, which may also be wrong, and happens readily when timestamped data is imported from systems with per-second granularity.
Finally, these forms constrain any internal representation, which cannot now ever evaluate to 23:59:59.99995 lest we suffer the same category of fault. This'd limit a standard library's timestamp object to a precision of 10μs, which is pretty coarse for many timing needs.
The proper form, that is, the ideal mathematical representation, is an interval with a closed left/lower bound and an open right/upper bound. That's written like
and can be pronounced "all times from and including midnight onwards, until (but strictly excluding) midnight the next day". These half-open intervals correspond advantageously to the continuously linear assumptions of chronometric time, with two properties of critical relevance: they can be recorded via commonplace machine representations of timestamps; and, they may be compared, subdivided, and concatenated without inadvertent breaks and overlaps. These qualities eliminate most aliasing & granularity concerns.Some (sadly not all) programming languages have such a construct available in their standard library.
I think there's a paper by Lamport recommending this form, although I couldn't find it in a quick rummage through the archives.