Subject: | DateTime::Duration's inverse() method does not preserve end_of_month_mode |
The following script demonstrates the bug. (A mutator method for the end_of_month
attribute would also be nice, since currently there's no way to work around the bug using a
public API.)
#!/usr/bin/perl
use strict;
use Test::More tests => 2;
use DateTime::Duration;
my $d = DateTime::Duration->new(days => 1, end_of_month => 'preserve');
is($d->end_of_month_mode, 'preserve', 'initial end_of_month_mode');
my $i = $d->inverse;
is($i->end_of_month_mode, 'preserve', 'end_of_month_mode retained after inverse()');