P
pwaring
I'm trying to use Date::Manip to resolve strings which represent dates
according to a known reference point - e.g. given a known date, what
does "Friday" represent?. If I do something like this:
my $date = ParseDate("Friday");
print $date;
I get the result I expect, i.e. 13/06/08 (assuming I changed the
format to DD/MM/YY). However, the date used for as the reference point
is always the current date, and I want to be able to put in an
arbitrary date and have the reference resolved from there. For
example, if I use this time last year, "Friday" should be resolved to
a different date - 15/06/07. Does anyone know if it is possible to do
this within Date::Manip? I've tried using DateCalc, but this gives me
an offset from the current date, which isn't really what I want.
Thanks in advance,
Paul
P.S. I'm only dealing with recent dates (1990-present), so there
shouldn't be any problems with pre-1900 dates etc.
according to a known reference point - e.g. given a known date, what
does "Friday" represent?. If I do something like this:
my $date = ParseDate("Friday");
print $date;
I get the result I expect, i.e. 13/06/08 (assuming I changed the
format to DD/MM/YY). However, the date used for as the reference point
is always the current date, and I want to be able to put in an
arbitrary date and have the reference resolved from there. For
example, if I use this time last year, "Friday" should be resolved to
a different date - 15/06/07. Does anyone know if it is possible to do
this within Date::Manip? I've tried using DateCalc, but this gives me
an offset from the current date, which isn't really what I want.
Thanks in advance,
Paul
P.S. I'm only dealing with recent dates (1990-present), so there
shouldn't be any problems with pre-1900 dates etc.