Skip Menu |

This queue is for tickets about the TimeDate CPAN distribution.

Report information
The Basics
Id: 125949
Status: open
Priority: 0/
Queue: TimeDate

Owner: Nobody in particular
Requestors: jim.avera [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: strptime returns negative month for certain inputs
Date: Sat, 28 Jul 2018 13:12:56 -0700
To: bug-TimeDate [...]
From: Jim Avera <jim.avera [...]>
Download (untitled) / with headers
text/plain 560b
Hello, Date::Parse::strptime("199001") returns -1 for the month.  This looks like a bug, as the docs say undef should be returned for missing fields (or an empty list if the input is not valid). Actually I was hoping that it would recognize YYYYMM as a partial date (with day omitted). In any case, negative results don't seem right. Date::Parse Version 2.30 Perl v5.26 perl -MDate::Parse -MData::Dumper -wE 'my @a=strptime("199001"); say Dumper(@a);' $VAR1 = undef; $VAR2 = undef; $VAR3 = undef; $VAR4 = '1'; $VAR5 = -1; $VAR6 = 90; $VAR7 = undef;

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to