https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24650
--- Comment #3 from Andrew Isherwood <[email protected]> --- Created attachment 98818 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98818&action=edit Bug 24650: Convert ISO datetimes to syspref dates This patch adds a function 'ISO_to_syspref' that accepts an ISO8601 / RFC3339 formatted timestamp, as returned from the API for datetime DB columns, and returns a string formatted according to the 'dateformat' syspref, optionally including the time Test plan: - Apply the patch - Load a page that uses calendar.inc, for example a patron's loan list in the staff interface - In the JS console, type the following and notice the printed date is in the format according to the syspref: var dt = new Date; console.log(ISO_to_syspref(dt.toISOString())); - In the JS console, type the following and notice the printed date is in the format according to the syspref, and includes the time: console.log(ISO_to_syspref(dt.toISOString(), true)); -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ 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/
