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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc (+2 lines)
Lines 32-37 Link Here
32
         * as well as a 'withtime' boolean denoting whether to include time or not in the output string.
32
         * as well as a 'withtime' boolean denoting whether to include time or not in the output string.
33
         */
33
         */
34
        window.$date = function(value, options) {
34
        window.$date = function(value, options) {
35
            if(!value) return '';
35
            var tz = (options&&options.tz)||def_tz;
36
            var tz = (options&&options.tz)||def_tz;
36
            var m = moment(value);
37
            var m = moment(value);
37
            if((m.creationData().format !== 'YYYY-MM-DD')&&tz) m.tz(tz);
38
            if((m.creationData().format !== 'YYYY-MM-DD')&&tz) m.tz(tz);
Lines 55-60 Link Here
55
        };
56
        };
56
57
57
        window.$time = function(value, options) {
58
        window.$time = function(value, options) {
59
            if(!value) return '';
58
            var tz = (opitons&&options.tz)||def_tz;
60
            var tz = (opitons&&options.tz)||def_tz;
59
            var m = moment(value);
61
            var m = moment(value);
60
            if(tz) m.tz(tz);
62
            if(tz) m.tz(tz);
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/js-date-format.inc (-1 / +2 lines)
Lines 31-36 Link Here
31
         * as well as a 'withtime' boolean denoting whether to include time or not in the output string.
31
         * as well as a 'withtime' boolean denoting whether to include time or not in the output string.
32
         */
32
         */
33
        window.$date = function(value, options) {
33
        window.$date = function(value, options) {
34
            if(!value) return '';
34
            var tz = (options&&options.tz)||def_tz;
35
            var tz = (options&&options.tz)||def_tz;
35
            var m = moment(value);
36
            var m = moment(value);
36
            if((m.creationData().format !== 'YYYY-MM-DD')&&tz) m.tz(tz);
37
            if((m.creationData().format !== 'YYYY-MM-DD')&&tz) m.tz(tz);
Lines 54-59 Link Here
54
        };
55
        };
55
56
56
        window.$time = function(value, options) {
57
        window.$time = function(value, options) {
58
            if(!value) return '';
57
            var tz = (opitons&&options.tz)||def_tz;
59
            var tz = (opitons&&options.tz)||def_tz;
58
            var m = moment(value);
60
            var m = moment(value);
59
            if(tz) m.tz(tz);
61
            if(tz) m.tz(tz);
60
- 

Return to bug 24980