You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an unfortunate side effect of the flexibility of the Date::Manip parsing. It tries to examine quite a few formats to find a date. In this case, you're parsing
Nov 2020
which it decides is equivalent to
Nov 20/20
or Nov 20, 2020
I'll have to examine the regexps to see if I can tighten them up a bit to avoid this.
Thanks. As this is affecting production, I quickly switched the helper to something like this:
use Time::Moment;
use Time::ParseDate;
my $d = parsedate("22 Aug 1955");
if (defined $d) {
print Time::Moment->from_epoch($d)->strftime("%Y%m%d"), "\n";
} else {
print "not valid\n";
}
Not my favorite (double hop) but that's what I quickly found.
The text was updated successfully, but these errors were encountered: