Re: comparing date values

2001-06-11 Thread Evgeny Goldin (aka Genie)
I'm using the DateTime::Precise for any date manipulation. It's good. Really good.

Re: comparing date values

2001-06-11 Thread Aaron Craig
At 12:45 08.06.2001 -0700, you wrote: >--- Brian Hersey <[EMAIL PROTECTED]> wrote: > > my $presesntdate = (localtime); > > my ( $day, $month, $year ) = (localtime)[3..5]; > $month++; # assume you want 1-12 instead of 0-11 > $year += 1900; > > > 2. How do I compare the date values, so th

Re: comparing date values

2001-06-08 Thread Curtis Poe
--- Brian Hersey <[EMAIL PROTECTED]> wrote: > my $presesntdate = (localtime); my ( $day, $month, $year ) = (localtime)[3..5]; $month++; # assume you want 1-12 instead of 0-11 $year += 1900; > 2. How do I compare the date values, so that I can get a numerical value of > days since the

Re: comparing date values

2001-06-08 Thread Justin Simoni
try something like this: my ($sec, $min, $hour, $day, $month, $year) = (localtime)[0,1,2,3,4,5]; $year = $year+1900; $month = $month+1; Perl has quite a few modules to fiddle around with dates a bit more cleaner and much more sophisticated than this, but this may be all you need, localtime()

comparing date values

2001-06-08 Thread Brian Hersey
Hi All, OK, I'm REALLY new to Perl, and programming in general (I know, *sigh*) but I have what should be a pretty simple question. I'm trying to make a logon feature for a site that would compare 2 dates, one in a MySQL database of when a user has registered with a service and the present date