in reply to doubt with date arithmetic

The superb Date::Calc module handles lots of calendar arithmetic pretty easily.