I take it you mean that you want to be able to get yesterdays date w/o having to worry about today being Jan 1, 2000 (for example). You might want to check out Date::Calc. It is pretty easy to use and provides lots of functionality including what you are looking for.