in reply to Re: Getting Weekly Dates
in thread Getting Weekly Dates

Or, as a 'one-liner':
perl -MTime::Local -wle ' for ($x = timelocal(0,0,0,1,0,2001); $x < timelocal(0,0,0,1,0,2002) +; $x += 24*60*60) { (localtime($x))[6] % 6 and print substr(localtime($x),0,10) }'
Very neat!

p

Replies are listed 'Best First'.
Re: Re: Re: Getting Weekly Dates
by japhy (Canon) on Mar 09, 2001 at 09:36 UTC
    Wow. Succinct, beautiful, and far less involving. I'm impressed. But you might want to use (0,0,12) instead of (0,0,0) for the time -- just in case you run into the daylight savings time switch.

    japhy -- Perl and Regex Hacker
      So _that's_ why you used noon. Good point.
      (You were trying to actually be useful, always a complicating factor.)

      p