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".