Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Format user entered date?by Sue D. Nymme (Monk) |
on Aug 31, 2009 at 20:46 UTC ( [id://792462]=note: print w/replies, xml ) | Need Help?? |
Date::Manip is good for accepting input in just about any conceivable format. It's big and slow, however. If you have a specific input/output format in mind, your best bet is to use DateTime and one of the many DateTime::Format modules. If none of them suit you, you can roll your own patterns with Regexp::Common::time, and you can use Time::Format to output dates/times in any format you like.
In Section
Seekers of Perl Wisdom
|
|