https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24650
David Nind <da...@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #98818|0 |1 is obsolete| | --- Comment #4 from David Nind <da...@davidnind.com> --- Created attachment 99061 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99061&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)); Signed-off-by: David Nind <da...@davidnind.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/