Because this is ISO 8601 date format, the standard date format that intentionally uses dashes to not confuse 25/01/22, 01/22/25 and 22/01/26 which are the same date in different formats
(that's why it uses dashes for dates, as for why it uses / for interval I have no idea)
Thanks for linking that. I’m a big proponent of using ISO 8601 but had either missed or completely forgotten about it specifying a format for intervals.
Note that ISO also permits a double hyphen as the interval separator which is hugely preferable to me personally and also works with file names (as mentioned in that Wikipedia article)
I know ISO 8601, but that doesn't answer my question. Let me rephrase this, why was a format intuitive to a machine chosen instead of a format which feels more intuitive to a human?
I think YYYY/MM/DD - YYYY/MM/DD will mean the correct thing to many more people than YYYY-MM-DD / YYYY-MM-DD, which I suspect many will interpret as an OR and not a RANGE.
Personally I think it goes a little over-flexible on support for non-strict formatted dates to the point it becomes difficult to figure out what a given date string is going to result in rather than feeling easier to use. That's probably part of the reason the primary example uses the clearer format.
Because the “humans” messed up so bad that there weren’t many options left for a simple enough standard. I would prefer ISO 8601 too over some slight variation which is allegedly more intuitive for homo sapiens sapiens. To keep it simple.
I'm with you on / not being a good range separator but using it for the individual dates is much much worse. Please stick to - for YYYY-MM-DD to avoid confusion and keep / restricted to inbred date formats.
Comments (98) 44 threads
Show all comments
Showing thread 16 of 44
Why 2025-01-22 / 2026-10-24?
Why not 2025/01/22 - 2026/10/24?
(that's why it uses dashes for dates, as for why it uses / for interval I have no idea)
Note that ISO also permits a double hyphen as the interval separator which is hugely preferable to me personally and also works with file names (as mentioned in that Wikipedia article)
RFC3339 at least lets you replace the ugly T with a space but also doesn't specify any spaces around "/" for ranges.
I think YYYY/MM/DD - YYYY/MM/DD will mean the correct thing to many more people than YYYY-MM-DD / YYYY-MM-DD, which I suspect many will interpret as an OR and not a RANGE.
Personally I think it goes a little over-flexible on support for non-strict formatted dates to the point it becomes difficult to figure out what a given date string is going to result in rather than feeling easier to use. That's probably part of the reason the primary example uses the clearer format.
Because the “humans” messed up so bad that there weren’t many options left for a simple enough standard.
I would prefer ISO 8601 too over some slight variation which is allegedly more intuitive for homo sapiens sapiens. To keep it simple.