PFT::Date - Representation of date
PFT::Date->new(2016, 12, 10) PFT::Date->from_spec( d => 12, m => 'june', # human friendly # missing ones (e.g. year) filled with today's year. ) PFT::Date->from_string('1955-11-05');
PFT::Date is defined as a blessed array reference. The first element is the year, the second is the month, the third is the day.
PFT::Date
Year getter
Month getter
Day getter
Returns a dictionary in the form
{ y => ..., m => ..., d => ... }
Returns a string representing the date. Optional parameter is a separator string, by default '-'
'-'
PFT::Date->new(1,2,3)->repr eq '0001-02-03' PFT::Date->new(1,2,3)->repr('/') eq '0001/02/03'
Returns a copy of the PFT::Date object with the provided components replaced.
PFT::Date->new(1, 2, 3)->derive(m => undef)
is like
PFT::Date->new(1, undef, 3)
Check if the date is complete of year, month and day.
To install PFT, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PFT
CPAN shell
perl -MCPAN -e shell install PFT
For more information on module installation, please visit the detailed CPAN module installation guide.