@@ -, +, @@ - Apply the patch - Load a page that uses calendar.inc, for example a patron's loan list - In the JS console, type the following and notice the printed date is - In the JS console, type the following and notice the printed date is --- koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) --- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc @@ -99,6 +99,16 @@ function DateTime_from_syspref(date_time) { return datetime; } +function ISO_to_syspref(date_time, include_time) { + var dt = new Date(Date.parse(date_time)); + var dateFormat = get_dateformat_str('[% Koha.Preference('dateformat') | html %]'); + dateFormat = dateFormat.replace('yyyy', 'yy'); + var ret = $.datepicker.formatDate(dateFormat, dt); + if (include_time) { + ret += ' ' + dt.getHours() + ':' + dt.getMinutes(); + } + return ret; +} /* Instead of including multiple localization files as you would normally see with jQueryUI we expose the localization strings in the default configuration */ --