Quoth Alejandro Colomar:
What do standards say about formatting dates?
Nothing that I know of.
Do they specify the character?
Not that I know of.
ISO 8601:2004 (not the newest revision, but the one I found), the
standard defining the YYYY‐MM‐DD explicitly calls for a “hyphen,”
stating additionally:
In an environment where use is made of a character repertoire based on
ISO/IEC 646, “hyphen” and “minus” are both mapped onto “hyphen-minus”.
This is not the case here. A hyphen is the character to use; that is,
an unescaped hyphen-minus in the input.
Most RFCs don't concern themselves with typography. :)
RFCs usually tell you that they are talking about ASCII.
However, date(1) only accepts hyphen-minus, so it would be nice to use
a compatible format, even if standards didn't mandate it.
The standard mandates a hyphen. A hyphen-minus is to be used where the
date is to be interpreted as a string to be given to \fIdate\fP.
By analogy, we don't compose man pages to write "don\[aq]t", even if for
some reason a person might want to type "don't" as input to a Unix
command. (I hope they've prepared for its potential interaction with
the shell's quoting mechanisms.) People have gradually realized over
the years that typing "don\[aq]t" is derpy and awkward. Typesetting
enthusiasts also note that it gives you a wrongly-shaped apostrophe in
DVI, PostScript, and PDF output.
I'm not convinced, because dates are not prose. Why should we use hyphens
in dates formatted with standards-like formats? I would agree in using
hyphens in dates if we spelled out dates unformatted, in plain English.
But if we use ISO-like or RFC-like formats, I think we should adhere to
them completely.
Great! Exactly my opinion. An RFC usually tells you to use ASCII, so
we should do that where applicable. Luckily, we aren’t concerned with
RFCs here, but with ISO 8601.
I unflinchingly agree with the remainder of the patch. I simply want to
caution against a robotic process of demoting perfectly legitimate
hyphens to the crudely compromised hyphen-minus character.
Please explain why they are reasonable there? What's the use of a
hyphen in a date? It's not a compound noun, or something like that.
The use of a hyphen is that it is a character not used in date formats
preceding ISO 8601.