Perlwannabe wrote:
I have a relatively simple script that needs to get two separate dates,
today's date, and yesterday's date. The dates are in mmddyy format.
Everything works great on days 2 - 31 of the month, but on the first of
the month yesterday's date is not correct. For example, on
perlwannabe [EMAIL PROTECTED] wrote:
:
: I have a relatively simple script that needs to get
: two separate dates, today's date, and yesterday's
: date. The dates are in mmddyy format.
: Here is the script:
:
:
: ## BEGIN SCRIPT
: my ($mday,
-Original Message-
From: Charles K. Clarkson [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 02, 2003 4:42 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: problem with date routine
perlwannabe [EMAIL PROTECTED] wrote:
:
: I have a relatively simple script that needs
Thank you for all of the responses to my date/time problem. I have
rewritten the routine with the information and feel confident it is far,
far better than what I had.
Thanks...
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Try something like this:
my($todayMday,$todayMon,$todayYear) = (localtime)[3..5];
my($yesterMday,$yesterMon,$yesterYear) = (localtime(time - 86400))[3..5];
$todayMon++;
$todayYear += 1900;
$yesterMon++;
$yesterYear += 1900;
-Original Message-
From: perlwannabe [mailto:[EMAIL