[Koha-bugs] [Bug 33029] Add wrapper method for dt_from_string to KohaDates template toolkit plugin

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 5 18:58:51 CEST 2023


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

Kyle M Hall <kyle at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #150353|0                           |1
        is obsolete|                            |

--- Comment #8 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 153071
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153071&action=edit
Bug 33029: Add wrapper method for dt_from_string to KohaDates template toolkit
plugin

It would be very useful to have direct access to dt_from_string in our
templates. This would allow for us to handle custom date and time formatting.
It would, for example, allow us to output the month name for a given date via
Template Toolkit easily.

Test Plan:
1) Apply this patch
2) In a notice add '[% Use KohaDates %][% KohaDates.datetime_from_string().ymd
%]' to the top of a notice
3) Generate that notice for a patron
4) Note today's date in iso format is rendered at the top of the notice

Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
Signed-off-by: Aleisha Amohia <aleishaamohia at hotmail.com>

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


More information about the Koha-bugs mailing list