better-staridc-MNBT
1/*!
2FullCalendar Moment Timezone Plugin v4.3.0
3Docs & License: https://fullcalendar.io/
4(c) 2019 Adam Shaw
5*/
6
7import * as momentNs from 'moment';
8import 'moment-timezone/builds/moment-timezone-with-data';
9import { createPlugin, NamedTimeZoneImpl } from '@fullcalendar/core';
10
11/*! *****************************************************************************
12Copyright (c) Microsoft Corporation. All rights reserved.
13Licensed under the Apache License, Version 2.0 (the "License"); you may not use
14this file except in compliance with the License. You may obtain a copy of the
15License at http://www.apache.org/licenses/LICENSE-2.0
16
17THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
19WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
20MERCHANTABLITY OR NON-INFRINGEMENT.
21
22See the Apache Version 2.0 License for specific language governing permissions
23and limitations under the License.
24***************************************************************************** */
25/* global Reflect, Promise */
26
27var extendStatics = function(d, b) {
28 extendStatics = Object.setPrototypeOf ||
29 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
30 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
31 return extendStatics(d, b);
32};
33
34function __extends(d, b) {
35 extendStatics(d, b);
36 function __() { this.constructor = d; }
37 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
38}
39
40var moment = momentNs; // the directly callable function
41var MomentNamedTimeZone = /** @class */ (function (_super) {
42 __extends(MomentNamedTimeZone, _super);
43 function MomentNamedTimeZone() {
44 return _super !== null && _super.apply(this, arguments) || this;
45 }
46 MomentNamedTimeZone.prototype.offsetForArray = function (a) {
47 return moment.tz(a, this.timeZoneName).utcOffset();
48 };
49 MomentNamedTimeZone.prototype.timestampToArray = function (ms) {
50 return moment.tz(ms, this.timeZoneName).toArray();
51 };
52 return MomentNamedTimeZone;
53}(NamedTimeZoneImpl));
54var main = createPlugin({
55 namedTimeZonedImpl: MomentNamedTimeZone
56});
57
58export default main;