philkime has asked for the wisdom of the Perl Monks concerning the following question:
Outputs:use DateTime::Format::ISO8601; my $dt = DateTime::Format::ISO8601->parse_datetime('2016'); say join(',', $dt->year, $dt->month, $dt->day); my $dt = DateTime::Format::ISO8601->parse_datetime('2016-01-01'); say join(',', $dt->year, $dt->month, $dt->day);
If I need to know whether there was a month/day in the input, the information is lost. Of course I could parse the input date myself to find this out but this is not lazy enough when there is a module that's supposed to be doing this for me. Any comments on this? I need some of the era functionality of DT but this issue prevents me from being able to use it at the moment.2016,1,1 2016,1,1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DateTime and ISO8601
by SBECK (Chaplain) on May 19, 2016 at 20:13 UTC | |
by philkime (Beadle) on May 19, 2016 at 20:47 UTC |