[Koha-bugs] [Bug 33242] New: 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 16 10:35:03 CET 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33242
Bug ID: 33242
Summary: Allow passing things like add_days => 3 to KohaDates
filter
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: koha-bugs at lists.koha-community.org
Reporter: m.de.rooy at rijksmuseum.nl
QA Contact: testopia at bugs.koha-community.org
I have a use case where I want to add some days to an issue date in a notice.
We either need a dt_from_string wrapper in our template plugin like bug 33029
proposes or allow passing options like add_days => X to KohaDates which looks
nicer but is less generic. Perhaps we can do both btw ! These approaches each
have their benefits and do not exclude each other.
Compare the 33029 approach
[% KohaDates.datetime_from_string(checkout.issuedate).add( days => 3) |
$KohaDates %]
with the approch of this report
[% checkout.issuedate | $KohaDates add_days => 3 %]
The latter notation is definitely shorter and prettier in my use case and does
only need a few lines more.
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list