Skip Menu |

This queue is for tickets about the Time-modules CPAN distribution.

Report information
The Basics
Id: 31477
Status: resolved
Priority: 0/
Queue: Time-modules

People
Owner: Nobody in particular
Requestors: anall [...] andreanall.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 2003.1126
  • 2006.0814
Fixed in: (no value)



Subject: Time::ParseDate -- noon/midnight bug
Time-modules - 2006.0814 This is perl, v5.8.6 built for darwin-thread-multi-2level Assuming that the time parsed into parsedate() can be split into a date and an arbitrary string, parsedate() seems to swallow "noon" and "midnight" from the artbirary string part, when it shouldn't. For most anything else, if the parser runs into an invalid date before a valid string it will error and/or stop: Show quoted text
> print Dumper(parsedate("Foo 11pm")); # no date/time before arbitrary string, so is invalid
$VAR1 = undef; $VAR2 = 'no match on time/date'; But for noon: Show quoted text
> print Dumper(parsedate("Foo noon")); # no date/time before arbitrary string, but
Time::ParseDate swallows the "noon" $VAR1 = 1197572400; $VAR2 = 'Foo '; Show quoted text
> print Dumper(parsedate("Foo afternoon")); # ditto
$VAR1 = 1197572400; $VAR2 = 'Foo after'; And midnight: Show quoted text
> print Dumper(parsedate("Foo midnight")); # ditto but for 'midnight'
$VAR1 = 1197529200; $VAR2 = 'Foo ';
Fixed in the coming release