[Koha-bugs] [Bug 21824] Add ability to format dates in various formats in templates

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Feb 17 11:15:16 CET 2019


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

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |katrin.fischer at bsz-bw.de

--- Comment #12 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
(In reply to Jonathan Druart from comment #11)
> I am not convinced we really need this additional parameter (and even less
> the new subroutine).
> 
> The following is much more readable IMO:
>   [% USE date %]
>   [% date.format(biblio.timestamp, '%F') %]
>   [% date.format(biblio.timestamp, '%Y-%m-%d') %]
> 
> 
> The only advantage would be to take into account the timezone if defined in
> the config.

Just some thoughts here:

So without the patch the above constructs only display the server time, but not
the configured time? If that's correct a syntax taking the timezone into
account might prove really helpful over time.

The advantage I see with using standard template toolkit operations is better
documentation and flexibility. At the moment the TT notices remain rather
unhelpful to libraries, because we lack documentation and examples (Josef++ for
his work on documentation this week)

What other formats would the new parameter support? In what kind of situations
would it be useful? I miss a 'real life example' in the test plan to make
things more clear.

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


More information about the Koha-bugs mailing list