Re: Yesterday's date

2002-04-08 Thread Dave Cross
On Mon, 08 Apr 2002 02:04:10 +0100, Troy May wrote: What's the easiest way to get yesterday's date from localtime? I need it in this format: (for today) 070402. Here is the code used for today's date: ($sec,$min,$hour,$mday,$mon,$year,undef,undef,undef) = localtime(); $mon++; $year

Yesterday's date

2002-04-07 Thread Troy May
What's the easiest way to get yesterday's date from localtime? I need it in this format: (for today) 070402. Here is the code used for today's date: ($sec,$min,$hour,$mday,$mon,$year,undef,undef,undef) = localtime(); $mon++; $year %= 100; $theDate = sprintf(%02u%02u%02u, $mday, $mon, $year

Re: Yesterday's date

2002-04-07 Thread fliptop
Troy May wrote: What's the easiest way to get yesterday's date from localtime? I need it in this format: (for today) 070402. use Date::Calc qw{ Today Add_Delta_Days }; my @date = Add_Delta_Days(Today, -1); printf Yesterday: %02u%02u%02u, $date[2], $date[1], substr($date[0], -2

Yesterday's date

2002-04-07 Thread Troy May
What's the easiest way to get yesterday's date from localtime? I need it in this format: (for today) 070402. Here is the code used for today's date: ($sec,$min,$hour,$mday,$mon,$year,undef,undef,undef) = localtime(); $mon++; $year %= 100; $theDate = sprintf(%02u%02u%02u, $mday, $mon, $year

RE: Yesterday's date

2002-04-07 Thread Wagner, David --- Technical Specialist I ---WGO
[mailto:[EMAIL PROTECTED]] Sent: Sunday, April 07, 2002 18:04 To: Perl Beginners Subject: Yesterday's date What's the easiest way to get yesterday's date from localtime? I need it in this format: (for today) 070402. Here is the code used for today's date: ($sec,$min,$hour,$mday,$mon,$year,undef