flynn7312 has asked for the wisdom of the Perl Monks concerning the following question:
produces#!/usr/bin/perl use strict; use Date::Calc qw(Delta_Days); my $origd1 = "01-02-2015"; my $origd2 = "05-06-2015"; my @a = split(/-|-/, $origd1, 3); my @b = split(/-|-/, $origd2, 3); my @c = join ( ',', reverse @a ); my @d = join ( ',', reverse @b ); print "@c\n"; print "@d\n"; my $difference = Delta_Days(@c, @d); print "Difference is $difference\n";
2015,02,01 2015,06,05 Date::Calc::PP::Delta_Days(): Usage: Date::Calc::Delta_Days($year1,$mo +nth1,$day1,$year2,$month2,$day2) at ./date_test.pl line 17
why not even the easiest things will work without hassles? any hints?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Date::Calc question
by Athanasius (Archbishop) on Jul 17, 2015 at 08:40 UTC | |
by flynn7312 (Acolyte) on Jul 17, 2015 at 09:04 UTC | |
|
Re: Date::Calc question
by FreeBeerReekingMonk (Deacon) on Jul 17, 2015 at 08:23 UTC | |
by flynn7312 (Acolyte) on Jul 21, 2015 at 12:51 UTC | |
by marto (Cardinal) on Jul 21, 2015 at 13:07 UTC | |
by flynn7312 (Acolyte) on Jul 21, 2015 at 13:30 UTC |