Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: menozero [...] gmail.com
Cc:
AdminCc:

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



Subject: Relative dates and durations
Giovanni Pensa writes: 1. It could be nice to be able to set the "now", so that relative dates would be relative to that moment and not to DateTime->now. 2. It could be nice to have a different behavior in parse_datetime_duration, where the second date is relative to the first and not to now. For example, "2009-03-10 9:00 to 11:00" is not what I'd expected, because 11:00 means today at 11:00. 3. It would be nice, but not very important, to have relative durations, like "for 4 hours". 4. (OK, I lied.) When setting a date, I usually truncate it to the last unit set. That usually makes sense. "2009-03-10" has the time of "now", and even others ask for midnight, see https://rt.cpan.org/Ticket/Display.html?id=43468 (Maybe an "at this time", or something else, could set the time of now...) "9:30" is relative to the date of today (correct) but has the seconds of now (it doesn't feel right to me). So my rule is "zero everything below".
The beginning three suggestions have been added with the v0.76_03 release. The 4th suggestion has been implemented as of v0.76_01. Thanks!