aboutsummaryrefslogtreecommitdiffstats
path: root/library/fullcalendar/packages/moment-timezone/index.global.js
blob: 6ed7fd94ea6b4db61908c515a3c6869329997d99 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*!
FullCalendar Moment Timezone Plugin v6.1.8
Docs & License: https://fullcalendar.io/docs/moment-timezone-plugin
(c) 2023 Adam Shaw
*/
FullCalendar.MomentTimezone = (function (exports, core, moment, internal) {
    'use strict';

    function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }

    var moment__default = /*#__PURE__*/_interopDefault(moment);

    class MomentNamedTimeZone extends internal.NamedTimeZoneImpl {
        offsetForArray(a) {
            return moment__default["default"].tz(a, this.timeZoneName).utcOffset();
        }
        timestampToArray(ms) {
            return moment__default["default"].tz(ms, this.timeZoneName).toArray();
        }
    }

    var plugin = core.createPlugin({
        name: '@fullcalendar/moment-timezone',
        namedTimeZonedImpl: MomentNamedTimeZone,
    });

    core.globalPlugins.push(plugin);

    exports["default"] = plugin;

    Object.defineProperty(exports, '__esModule', { value: true });

    return exports;

})({}, FullCalendar, moment, FullCalendar.Internal);