in reply to How can I count the days between two dates?
Here's a snippet I use a lot at home-
use Date::Calc "Delta_Days"; my $first = shift || die "Give two date strings YYYYMMDD YYYYMMDD\n"; my $second = shift || die "Give two date strings YYYYMMDD YYYYMMDD\n"; my $days = Delta_Days( $first =~ /(\d\d\d\d)(\d\d)(\d\d)/, $second =~ /(\d\d\d\d)(\d\d)(\d\d)/ ); print $days, $/;
Though I love the DateTime stuff when anything gets much hairier than that.
|
|---|