A somewhat small addition:
Although Date::Calc is specified in scalars for the year, month and day, it
is easier to work using an @array for the date where:
$array[0] = $year;
$array[1] = $month;
$array[2] = $day;
So:
use strict;
use warnings;
use Date::Calc;
...
my @array = split "-'", $date_string;
my $in_ten_days_it_will_be = Add_Delta_Days(@array, 10);
Happy dates manipulation!
Meir
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Yona Shlomo
Sent: יום א 30 דצמבר 2012 09:09
To: [email protected]
Subject: [Israel.pm] Date manipulations
Hello,
I have date items of the form yyyy-mm-dd and I'd like to be able to
manipulate them in the following ways:
Given such a date I'd like to ask ordinal questions such as:
what was the date k days before (e.g., what is the date
yesterday) or what will be the date n days from that date (e.g., what's the
date 10 days later).
What's a practical way to go about this?
Thanks.
--
Shlomo Yona
[email protected]
http://yeda.cs.technion.ac.il/~yona/
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2221 / Virus Database: 2637/5496 - Release Date: 12/29/12
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl