in reply to Re: Comparing two dates and getting back difference in days
in thread Comparing two dates and getting back difference in days

That's how it used to be before DateTime. That's why there is only DateTime now.
use DateTime; use strict; use warnings; my $str = "2004-01-14"; my( $y, $m, $d ) = split /\D/,$str; my $delta = DateTime->new( year => $y, month => $m, day => $d, )->delta_days( DateTime->now(), ); die $delta->days; __END__ 0 at datetime4.pl line 16.

Replies are listed 'Best First'.
Re: Re: Re: Comparing two dates and getting back difference in days
by Roy Johnson (Monsignor) on Jan 21, 2004 at 18:42 UTC
    DateTime homepage

    Is there an ActiveState repository with it?


    The PerlMonk tr/// Advocate
      DateTime failed to compile as a module for Perl 5.8 as per ActiveState's Build page.

      For Perl 5.6 it only exists as a ppm for the hpux-pa-risc.

      CountZero

      "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law