in reply to Getting previous dates from the current date

This should work - I had a similar question here a while back and this is what I came up with - with the help of others...
use POSIX qw(strftime); my $thisday = time; my $SixtyDaysPrevious = $thisday - 60 * 24 * 60 * 60; $SixtyDaysPrevious = strftime "%m/%d/%Y", ( localtime($SixtyDaysPre +vious) );

Replies are listed 'Best First'.
Re^2: Getting previous dates from the current date
by Smylers (Pilgrim) on Mar 29, 2005 at 17:32 UTC
    This should work

    But it won't do all the time: you've fallen for the apparently common trap of assuming that days have 24 hours in them, then using localtime.

    More generally, you've fallen for the trap of trying to write this stuff yourself rather than trusting the DateTime geniouses to have got it right for you, so that you don't need to think about such awkwardnesses.

    Smylers

      should being the operative word. Its worked to my advantage that just enough was good enough.