Date and Time in Perl
Introduction
Many newcomers to Perl ask how to properly handle, process and manipulate dates and times in Perl. The proper answer is that while Perl has basic facilities for this in perlfunc and the POSIX module, one should use a good date-and-time module from CPAN. This page aims to lead people in the right direction.
CPAN Distributions for Date and Time Manipulation
DateTime
The DateTime CPAN distribution is a highly recommended module for handling dates and times. Here are some useful helper packages for it:
- DateTime-Format-Strptime - parses dates in arbitrary formats.
- DateTime-Format-W3CDTF, DateTime-Format-Atom and other "DateTime-Format-" modules - useful for parsing and formatting dates using various standard date formats.