From c1edb869f9f4683baa6a02c43dc58befed5bc0db Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 25 May 2023 11:57:15 +0100 Subject: [PATCH] Bug 33804: (follow-up) Convert to JSDoc formatted documentation --- .../prog/en/includes/js-date-format.inc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc index 06fdcb67f1..98379c79dd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc @@ -33,12 +33,18 @@ 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. - * 'as_due_date' can be passed to format a date time as a due date: The time part will not be displayed if 23:59. + * @param {String|Date} value rfc3339 formatted date string or a JS Date object. + * @param {Object} [options] Optional set of switches for changing date handling + * @property {String} [options.tz] String representing the timezone of the passed date + * @property {Boolean} [options.no_tz_adjust] Enable/Disable timezone adjustment + * @property {String} [options.dateformat] + * @property {Boolean} [options.withtime] Enable/Disable appearance of time in returned string + * @property {String} [options.timeformat] + * @property {Boolean} [options.as_due_date] Enable/Disable due date output format + * @returns {String} A date string formatted as per the koha instance configuration. */ window.$date = function(value, options) { if(!value) return ''; -- 2.40.1