[Sigia-l] display of date in multilanguage portal

Jon Hanna jon at spin.ie
Fri Mar 14 09:38:29 EST 2003


> There is an ISO standard for this (8601?).

Yes, it's also the basis for the national standards of many (most?)
countries.

 It recommends going from
> least to most specific in time/date formats.

Nope, it mandates it.

>   Year-Month-Day Hours:Minutes:Seconds
>
>   2003, February 1st  or 03-02-01
>
> IIRC it's a weird standard because it allows for so many variations
> and short forms as to be almost useless.

I can't think of any examples of ambiguous datetimes that are ISO 8601
compliant.

It is very flexible in terms of what can be an ISO 8601 datetime, but that
is because its intention is to cover just about any possible date, time, or
repeated date and time, and period of elapsed time to just about any degree
of resolution that can be defined in terms of the Georgian calendar and the
24/60/60 division of each day.

Generally one doesn't use bare ISO 8601 datetimes, but defines a *profile*
of it, and use that.

For example the American ANSI X3.30 (and if memory serves the Canadian CSA
Z-whatever...) would use 20030201 for the above date, where the web[1] would
use 2003-02-01.

[1] By the web I mean HTML and a whole slew of other web standards (pretty
much any created or last ammended after 1997).
Unfortunately HTTP servers send dates in RFC 1123 (an update from RFC 822,
leading to many erroneous assertions that it uses RFC 822), but also allow
dates from some other RFC I can't be bothered looking up and the format of
C's asctime() function. None of which is particularly nice to code compared
to a nicely restricted sub-profile of the web's 8601 profile, but the last
thing we need is to have to support 4 instead of 3 formats at that level.




More information about the Sigia-l mailing list