in reply to Getting previous dates from the current date

Try this:

#! /usr/bin/perl -w use strict; use Date::Manip qw(ParseDate); print ParseDate("1 day ago") . $/; print ParseDate("7 days ago") . $/; print ParseDate("14 days ago") . $/;

Date::Manip is fun to mess around with, I'm surprised at the kinds of "fuzzy" descriptions it can handle.

update: I didn't search carefully enough to see that cazz had already mentioned this module.

update: In the interest of good form, added the import list. Is it kinda uncool that ParseDate is exported by default?