main.js 3.0 KB

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