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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

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.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://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/

Reply via email to