http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10694
--- Comment #39 from Kyle M Hall <[email protected]> --- Colin, there is no place in these patches where I make a change like that. (In reply to Colin Campbell from comment #38) > This changes the api of a routine used in many places so the change should > be clearer. The return_date is an optional parameter but this is not > indicated in the documentation of the subroutine, a comment or even > explicitly in the code, being handled as a side effect of the date routines. > > Instead of replacing > my $today = DateTime->now( time_zone => C4::Context->tz() ); > by > my $today = dt_from_string( $return_date, 'iso' ); > > can I suggest that: > my $today; > if ($return_date) { > $today = dt_from_string( $return_date, 'iso' ); > } > else { > $today = DateTime->now( time_zone => C4::Context->tz() ); > } > > makes the logic a bit clearer without forcing the reader to inspect the > DateUtils code to see that having a return_date is not required -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] 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/
