Bug 33804: (follow-up) Convert to JSDoc formatted documentation

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Martin Renvoize 2023-05-25 11:57:15 +01:00 committed by Tomas Cohen Arazi
parent 1000ab402b
commit 930eb65c94
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -33,12 +33,18 @@
return time_pattern; return time_pattern;
}; };
/* /**
* A JS equivilent of the KohaDates TT Plugin. Passed an rfc3339 formatted date string, * 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. * 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 * @param {String|Date} value rfc3339 formatted date string or a JS Date object.
* as well as a 'withtime' boolean denoting whether to include time or not in the output string. * @param {Object} [options] Optional set of switches for changing date handling
* '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. * @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) { window.$date = function(value, options) {
if(!value) return ''; if(!value) return '';