in reply to help on getting date
Personally, if sorting or comparing human-readable dates is important, I'd recommend YYYY-MM-DD format. It naturally sorts, and reduces ordering confusion about 3 June or 6 January. Bigger units to the left.
As mentioned, localtime() will return the individual components for you. Just remember to add 1 to the month and 1900 to the year.
If your data is already IN the poor MM-DD-YYYY format, then you'll need the help of one of the Date::* modules to convert or compute back to a useful scalar unit like epoch time, Julian dates, or something. Keep dates numeric internally, and provide formatted equivalents only for user presentation.
--
[ e d @ h a l l e y . c c ]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: help on getting date
by arturo (Vicar) on Jun 02, 2003 at 18:05 UTC | |
by boo_radley (Parson) on Jun 02, 2003 at 19:33 UTC |