View | Details | Raw Unified | Return to bug 33804
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc (-5 / +10 lines)
Lines 33-44 Link Here
33
            return time_pattern;
33
            return time_pattern;
34
        };
34
        };
35
35
36
        /*
36
        /**
37
         * A JS equivilent of the KohaDates TT Plugin. Passed an rfc3339 formatted date string,
37
         * A JS equivilent of the KohaDates TT Plugin. Passed an rfc3339 formatted date string,
38
         * or JS Date, the function will return a date string formatted as per the koha instance config.
38
         * or JS Date, the function will return a date string formatted as per the koha instance config.
39
         * Optionally accepts a dateformat parameter to allow override of the configured output format
39
         * @param {String|Date} value                   rfc3339 formatted date string or a JS Date object.
40
         * as well as a 'withtime' boolean denoting whether to include time or not in the output string.
40
         * @param {Object} [options]                    Optional set of switches for changing date handling
41
         * '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.
41
         * @property {String} [options.tz]              String representing the timezone of the passed date
42
         * @property {Boolean} [options.no_tz_adjust]   Enable/Disable timezone adjustment
43
         * @property {String} [options.dateformat]      
44
         * @property {Boolean} [options.withtime]       Enable/Disable appearance of time in returned string
45
         * @property {String} [options.timeformat]      
46
         * @property {Boolean} [options.as_due_date]    Enable/Disable due date output format
47
         * @returns {String}                            A date string formatted as per the koha instance configuration.
42
         */
48
         */
43
        window.$date = function(value, options) {
49
        window.$date = function(value, options) {
44
            if(!value) return '';
50
            if(!value) return '';
45
- 

Return to bug 33804