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:
parent
1000ab402b
commit
930eb65c94
1 changed files with 10 additions and 4 deletions
|
@ -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 '';
|
||||||
|
|
Loading…
Reference in a new issue