0.13 2003-05-05
[ IMPROVEMENTS ]
- DateTime now does more validation of parameters given to
constructors and to the set() method, so bogus values like a month of
13 are a fatal error.
I'm not entirely sure I'd call this an improvement.
In 0.12 code, I'm able to do things like:
my $month = 12;
my $dt1 = DateTime->new('month' => $month, 'year' => 2002);
print join(' ', $dt1->ymd(), $dt1->hms()) . "\n";
####
my $dt2 = DateTime->new('month' => $month + 1, 'year' => 2002, 'second' => -1);
print join(' ', $dt2->ymd(), $dt2->hms()) . "\n";
To get the beginning and ending times of a month:
2002-12-01 00:00:00
2002-12-31 23:59:59
How would one do this with >= 0.13 releases?
This seems like useful functionality to me.
-D
--
Indifference will certainly be the downfall of mankind, but who cares?