in reply to Calculating 1-day-before
($d,$m,$y)=(localtime((time-60*60*(12+(localtime)[2]))))[3,4,5]; [download]
That will break for time zones that use daylight savings time. On the days where the clock is set back an hour, you will not be subtracting enough from time() to make that work. Better to use Date::Calc, as suggested elsewhere in this thread.