[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: date formats

Stein Gjoen wrote:
> David Merrill wrote:
> > AFAIK, nobody uses YYYY-MM-DD. The ambiguous dates are those where the
> > year falls last (US usage is MM-DD-YYYY while English (and others) is
> > DD-MM-YYYY).
> Trivia: In Japan they use YYYY-MM-DD, often with kanji for year, month
> and day. Inother countries people use "/" rather than "-" to separate
> the fields. Al in all it is a complete mess.

Actually, I think he meant that YYYY-MM-DD won't confuse anyone, because
nobody uses YYYY-DD-MM.  The separator shouldn't confuse anybody either -- I
personally prefer a period.  Think about someone looking at 2000/10/12.  Is
it October 12 or December 10?  Us dumb Americans will assume that it is in
MM-DD format, just like we are used to.  October 12.  Everyone else will be
smart enough to figure out that since it starts with the year, the next
field will be the month, because why would you put the day next to the year?
October 12.  So there is no mess with YYYY-MM-DD.

Another nice thing about YYYY-MM-DD format is that it is sortable with
normal ASCII sorting.  No parsing required.

> Also I believe there is a GNU package that deals with most date formats
> in use and also tries to some extent guess format of a given string.
> 	http://www.gnu.org/manual/glibc-2.0.6/html_chapter/libc_17.html

No, it can write to different formats, but has no function to parse a date.

Craig M. Buchek

To UNSUBSCRIBE, email to ldp-discuss-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org