Skip Menu |

This queue is for tickets about the DateTime-Format-Natural CPAN distribution.

Report information
The Basics
Id: 41266
Status: resolved
Priority: 0/
Queue: DateTime-Format-Natural

People
Owner: Nobody in particular
Requestors: KILINRAX [...] cpan.org
Cc:
AdminCc:

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



Subject: Inaccurate parsing of seconds.
The seconds value appears to be taken from the current time - except when a specific named time (midnight, noon, morning, afternoon, evening) is encountered. This is at best undesirable. Is it possible to add a configuration option to switch between 'relative to now' and 'relative to some fixed time' (e.g. midnight), so that I don't have to tromp over the parsed seconds value? This probably wouldn't be such a problem if ::Lang::EN could handle things like '2008/11/27 3:20:00' (which, bizarrely, is parsed to '2008-11-27T15:53:58') on my machine. Also, '3:20pm' parses to '15:45:52', but '3:20 pm' to '15:20:54'.
On Thu Nov 27 10:56:38 2008, KILINRAX wrote: Show quoted text
> The seconds value appears to be taken from the current time - except > when a specific named time (midnight, noon, morning, afternoon, evening) > is encountered. > This is at best undesirable. Is it possible to add a configuration > option to switch between 'relative to now' and 'relative to some fixed > time' (e.g. midnight), so that I don't have to tromp over the parsed > seconds value?
Yes, I concur. Since I'm not sure yet where it should be made part of the public user interface, I'd appreciate some suggestions. Show quoted text
> This probably wouldn't be such a problem if ::Lang::EN could handle > things like '2008/11/27 3:20:00' (which, bizarrely, is parsed to > '2008-11-27T15:53:58') on my machine.
Such input does not currently (as with latest version: v0.73_03) parse here without failure. You probably ought to check first whether the parsing did succeed by inspecting the return value of the success method to avoid bogus results. Show quoted text
> Also, '3:20pm' parses to '15:45:52', but '3:20 pm' to '15:20:54'.
Likewise absence of success applies for former input here. FYI: both of these unexpected results will be addressed with the upcoming development release v0.73_04. Thanks, Steven
Resolved completely as of v0.76_01.