Subject: | Loss of information with missing month/year |
Currently, DT doesn't seem to be able to distinguish between missing and default months/days:
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);
both output the same thing (2016,1,1).
Could there be a couple of get methods that would return undef for missing month/year in the input or is this caused by the Format modules? It's a bit of a pain as when one has the resulting DT object, one has lost information about the source data.