Intuitively, it would seem that specifying the 'before' of a datetime span using the end option of the ->from_datetimes() constructor would yield a range that is 1 second (1 nanosecond?) earlier than the actual date supplied.
But as it is stands, the end of a range specified using the 'before' option is the same as one specified using the 'end' option: use strict; use warnings; use DateTime; use DateTime::Span; my $dt1 = DateTime->new( year => 2002, month => 3, day => 11 ); my $dt2 = DateTime->new( year => 2003, month => 4, day => 12 ); my $span = DateTime::Span->from_datetimes( start => $dt1, before => $dt2 ); warn 'start: ' . $span->start . ' end: ' . $span->end; my $span = DateTime::Span->from_datetimes( start => $dt1, end => $dt2 ); warn 'start: ' . $span->start . ' end: ' . $span->end; ### same output as with 'before'
