Catmandu::Fix::split_date - split a date field into year, month and date
# {date => "2001-09-11"} expand_date('date') # => { date => { year => 2001, month => "9", day => "11" } } # { datestamp => "2001:09" } expand_date('datestamp') # => { datestamp => { year => 2001, month => "9" } }
The date field is expanded if it contains a year, optionally followed by numeric month and day, each separated by - or :.
-
:
To install Catmandu::Fix::Date, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catmandu::Fix::Date
CPAN shell
perl -MCPAN -e shell install Catmandu::Fix::Date
For more information on module installation, please visit the detailed CPAN module installation guide.