I was reading through the subtraction section of DateTime POD and it
was a bit confusing because the comment "is DST" and "not DST" for the
$dt objects are all wrong. Attached is a patch to fix this.
--
Tatsuhiko Miyagawa
Index: lib/DateTime.pm
===================================================================
--- lib/DateTime.pm (revision 3768)
+++ lib/DateTime.pm (working copy)
@@ -2841,12 +2841,12 @@
my $dt1 = DateTime->new( year => 2003, month => 5, day => 6,
time_zone => 'America/Chicago',
);
- # not DST
+ # is DST
my $dt2 = DateTime->new( year => 2003, month => 11, day => 6,
time_zone => 'America/Chicago',
);
- # is DST
+ # not DST
my $dur = $dt2->subtract_datetime($dt1);
# 6 months
@@ -2859,13 +2859,13 @@
hour => 1, minute => 58,
time_zone => "America/Chicago",
);
- # is DST
+ # not DST
my $dt2 = DateTime->new( year => 2003, month => 4, day => 7,
hour => 2, minute => 1,
time_zone => "America/Chicago",
);
- # not DST
+ # is DST
my $dur = $dt2->subtract_datetime($dt1);
# 2 days and 3 minutes
@@ -2877,13 +2877,13 @@
hour => 1, minute => 58,
time_zone => "America/Chicago",
);
- # is DST
+ # not DST
my $dt2 = DateTime->new( year => 2003, month => 4, day => 6,
hour => 3, minute => 1,
time_zone => "America/Chicago",
);
- # not DST
+ # is DST
my $dur = $dt2->subtract_datetime($dt1);
# 1 day and 3 minutes