It depends on what you mean by "following month."  
How do you define the following month after May 31?  Is it June 30?
How do you define the following month after June 30?  Is it July 30? or is
it July 31?
February 28 -> March 28? or March 31?  
Do you mean last number of the month, exactly 30 days after, or the same
number as the previous month?

It's all possible to do, you just have to know what you mean by "following
month."

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 21, 2002 3:57 PM
To: [EMAIL PROTECTED]
Subject: Date question


I have a question about my date snippet.

my ($mday, $mon, $year) = (localtime(time))[3..5];
my $pagedate = sprintf "%02u/%02u/%u", $mon + 1, $mday,
 $year + 1900;

The above will print out the date like "05/21/2002" 

How can I create the date exactically to the same day but
 to the following month?

Then I would have: start date "05/21/2002"
                   end date   "06/21/2002"

Or for whatever date....
Thanks in advance.
Allan
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to