International Date formats
International Date formats
От:
Gary Warner <gar@askgar.com>
Дата:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Does anyone have a suggestion for being able to store "dates" parsed from email headers that would handle a fairly international set of formats? Or do I need to do date-conversion prior to trying to store? currently choking on things like "Ene-18-2007" (Enero = January) and "Sau-20-2007" or "Oca-29-2007" or (I have no idea what "Sau" or "Oca" are) and we especially don't seem to like dates that my 7-bit Windows window calls things like: "╤│≈-11-2007" _-_ gar -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGL3iwg79eYCOO6PsRAppAAJ9UGqHIEqkBjUuP8YMXiPKJJsMDDACeN8QI DVhq6xz4CpYc/+F5fepdqo4= =bkJG -----END PGP SIGNATURE-----
Re: International Date formats
От:
"Daniel T. Staal" <DStaal@usa.net>
Дата:
On Wed, April 25, 2007 11:50 am, Gary Warner said: > Does anyone have a suggestion for being able to store "dates" parsed > from email headers that would handle a fairly international set of > formats? Or do I need to do date-conversion prior to trying to store? > > currently choking on things like "Ene-18-2007" (Enero = January) and > "Sau-20-2007" or "Oca-29-2007" or (I have no idea what "Sau" or "Oca" > are) and we especially don't seem to like dates that my 7-bit Windows > window calls things like: "â¤ââ-11-2007" I'd say either store them as a string (If you don't need to do date comparisons), or find a date conversion package that can handle everything. (I'd suggest taking a look at Perl modules, they are likely to have something which you could integrate fairly easily.) There are a million and one different date formats; either you spend all your time figuring out new ones, or you support a few common ones and spend your time on other things. The Postgres team follows the latter. Daniel T. Staal --------------------------------------------------------------- This email copyright the author. Unless otherwise noted, you are expressly allowed to retransmit, quote, or otherwise use the contents for non-commercial purposes. This copyright will expire 5 years after the author's death, or in 30 years, whichever is longer, unless such a period is in excess of local copyright law. ---------------------------------------------------------------