[Koha-bugs] [Bug 33242] Allow passing things like add_days => 3 to KohaDates filter

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Mar 23 09:10:52 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33242

--- Comment #14 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
(In reply to Marcel de Rooy from comment #13)
> (In reply to Jonathan Druart from comment #12)
> > Yes, more code to maintain, and the parsing here looks hacky to me, for less
> > flexibility.
> 
> What is hacky in this parsing ?
> if( $entry =~
> /^(add|subtract)_(years|months|weeks|days|hours|minutes|seconds)$/ ) {

Here you are providing an handy way to do date calculation, but without its
flexibility. It's all what I am saying.

For instance what about the end_of_month limit? You cannot change it.

But really, if others find it useful, just let it go ;)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list