From 930eb65c94342ae0f1a2bd993acaefcff8564e18 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 Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- .../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..b9ef294f96 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.39.5