| Module Info
| Add a review of TimeDate
This should be renamed the Date::Awesome module. Much, much better than that localtime stuff in core Perl. Date::Parse will parse absolutely anything close to a date string, yet it's smart enough to know to not try to parse, say, times in sentences.
Another excellent Graham Barr module.
Though easy to use and well documented, the functions in Date::Format are a replication of the functions already found in POSIX which is built into perl.
A generally useful module that covers a range of date formats, with support provided for a number of languages, by sub-class.
The documentation is apparently somewhat out of date: the POD reads as follwos:
will change the language in which all subsequent dates are formatted.
This is only a first pass, I am considering changing this to be
$lang = Date::Language->new('German');
$lang->time2str("%a %b %e %T %Y\n", time);
The methodology considered appears to now be in place, since the object methods described work, and the class method produces:
Can't locate object method "language" via package "Date::Format" ...
Sub-classing to provide support for further languages is a messy business, without suitable docs.
Also be warned that when the module says 'English', it in fact means 'American English.' This should be corrected, since MM/DD/YY is confusing to non-Americans who do not expect it.
The author did not respond to a patch to supply support for Hungarian so it had to be put up by itself.
Lacks the sweeping scope, and breath taking vision of the DateTime project, but this classic Perl module is still an exemplar of the Perl old guard, and a tool I reach for whenever I need to do some quick date hacking. perl -MDate::Parse -MDate::Format -e 'print time2str("%C", str2time($mydate))', is a oneliner I reach for over and over.
This is my favorite date distribution. Old faithful. It can handle most date formats I throw at it, it can format it any way I want, and it isn't very slow.