Subject: | strptime accepts day 0 |
The date returned for day 01 is the same as day 00:
$ perl -MTime::Piece -wE 'say Time::Piece->strptime("20170101", "%Y%m%d")'
Sun Jan 1 00:00:00 2017
$ perl -MTime::Piece -wE 'say Time::Piece->strptime("20170100", "%Y%m%d")'
Sun Jan 1 00:00:00 2017
On the other hand, day 32 fails:
$ perl -MTime::Piece -wE 'say Time::Piece->strptime("20170132", "%Y%m%d")'
Error parsing time at .../perl5/lib/perl5/x86_64-linux-thread-multi/Time/Piece.pm line 481.
Similarly, 20170230 and 20170231 work, but 20170232 fails.