There are several modules that could manipulate dates/times, albeit a little different than what you proposed. Take a look for example at
Date::Manip,
Date::Calc, or
Date::Handler::Delta. Like I said before, there are several modules and I only posted three. You might want to search
CPAN yourself to find the one that will suit you best.
UPDATE: taken out the nagging ...