"[EMAIL PROTECTED]" wrote:
>
> Hi all,
Hello,
> as part of my program i want to jump from 00:00:00 on the
> first of any
> given month to 00:00:00 on the first of the next month. i wrote a subroutine to
> calculate this. the relevent code looks like this
>
> [snip code]
$ perl -le'us
You might have to use 'gmtime' for it to work.
Try this too (tested):
--
use Date::Tie;
tie %date, 'Date::Tie';
%date = ( year => 2001, month => 8, day => 1, hour => 0, minute => 0,
second => 0 );
print $date{epoch}, "\n";
$date{month}++;
print $date{epoch}, "\n";
$date{mo
On Dec 27, Jeff 'japhy' Pinyan said:
>Then please test it. Your missing the necessary
And I'm missing the necessary "code is" after the "Your".
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan
On Dec 27, Hanson, Robert said:
># UNTESTED!
Then please test it. Your missing the necessary
use Time::Local;
line.
>sub nextMonth {
> my $time = shift;
>
> # get date info for that time, increment month only.
> my @date = localtime($time);
> $date[4]++;
>
> # check for month out of b
ailto:[EMAIL PROTECTED]]
Sent: Thursday, December 27, 2001 2:41 AM
To: [EMAIL PROTECTED]
Subject: sub to jump to begining of month
Hi all,
as part of my program i want to jump from 00:00:00 on the
first of any
given month to 00:00:00 on the first of the next month. i wrote a subroutine
to
calc
Hi all,
as part of my program i want to jump from 00:00:00 on the
first of any
given month to 00:00:00 on the first of the next month. i wrote a subroutine to
calculate this. the relevent code looks like this
my ($sec,$min,Hour,$mday,$m