https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17699
M. Tompsett <mtomp...@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtomp...@hotmail.com Status|Needs Signoff |In Discussion --- Comment #3 from M. Tompsett <mtomp...@hotmail.com> --- #!/usr/bin/perl -w use Modern::Perl; use Data::Dumper; use List::MoreUtils qw / none /; use Time::Fake; BEGIN { my @paths = split ':', $ENV{'PERL5LIB'}; if (@paths) { foreach my $path (@paths) { if (none { $_ eq $path } @INC) { push @INC, $path; } } } } use Koha::DateUtils; for my $count (1..366) { Time::Fake->offset(sprintf("-%dd",$count)); my $old_last_month = dt_from_string->add( months => -1 )->truncate( to => 'day' ); my $wrap_last_month = dt_from_string->subtract( months => 1, end_of_month => 'wrap' )->truncate( to => 'day' ); my $preserve_last_month = dt_from_string->subtract( months => 1, end_of_month => 'preserve' )->truncate( to => 'day' ); my $limit_last_month = dt_from_string->subtract( months => 1, end_of_month => 'limit' )->truncate( to => 'day' ); my $this_day = dt_from_string; print sprintf("T:%s O:%s W:%s P:%s L:%s\n",$this_day,$old_last_month,$wrap_last_month,$preserve_last_month,$limit_last_month); } I'm thinking 'limit'for month subtraction. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/