@@ -, +, @@ --- .../intranet-tmpl/prog/en/includes/js-date-format.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc @@ -24,6 +24,12 @@ return time_pattern; }; + /* + * A JS equivilent of the KohaDates TT Plugin. Passed an rfc3339 formatted date string, + * or JS Date, the function will return a date string formatted as per the koha instance config. + * Optionally accepts a dateformat parameter to allow override of the configured output format + * as well as a 'withtime' boolean denoting whether to include time or not in the output string. + */ window.$date = function(value, options) { var tz = (options&&options.tz)||def_tz; var m = moment(value); @@ -59,4 +65,4 @@ } })(); - + --