P
Peter Makholm
I have a command line application where the use specifies a time span
with two arguments --from and --to. At the moment I'm using strptime
from Date:
arse, but it would be nice to support dates like '2 days
ago', 'today', 'next friday'.
If the user doesn't specifies a exact time but just a day I would like
to have the from argument use the start of the date (00:00:00) and the
to argument use the end of the date (23:59:59).
Date::Manip and Time:
arseDate both parses these natural language
timestamps, but I can't get either to work quite as I need. Both seem
to have 'today' parsed as 'right now' as default.
Date::Manip have a TodayIsMidnight setting, but 'tomorrow' is still '24
hours from right now' and I can't differ between wether the user used
the not specific 'today' or '2008-03-03 00:00:00' which would mean
differing things in the to argument.
Time:
arseDate has a nice TIME_REQUIRED setting, but it seems to be
non-working for relative dates like today and tomorrow by coding.
Any idears for a solution?
with two arguments --from and --to. At the moment I'm using strptime
from Date:
ago', 'today', 'next friday'.
If the user doesn't specifies a exact time but just a day I would like
to have the from argument use the start of the date (00:00:00) and the
to argument use the end of the date (23:59:59).
Date::Manip and Time:
timestamps, but I can't get either to work quite as I need. Both seem
to have 'today' parsed as 'right now' as default.
Date::Manip have a TodayIsMidnight setting, but 'tomorrow' is still '24
hours from right now' and I can't differ between wether the user used
the not specific 'today' or '2008-03-03 00:00:00' which would mean
differing things in the to argument.
Time:
non-working for relative dates like today and tomorrow by coding.
Any idears for a solution?