UNPKG

@drewsonne/maya-dates

Version:

Typescript package to manipulate dates in the Maya Calendar

70 lines 2.52 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var western_1 = __importDefault(require("./western")); var GregorianCalendarDate = (function (_super) { __extends(GregorianCalendarDate, _super); function GregorianCalendarDate() { return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(GregorianCalendarDate.prototype, "offset", { get: function () { if (this.julianDay === 2299160) { return 0; } if (this.julianDay <= 1448283) { return -8; } if (this.julianDay <= 1455864) { return -8; } if (this.julianDay <= 1599864) { return -5; } if (this.julianDay <= 1743864) { return -2; } if (this.julianDay <= 1887864) { return 1; } if (this.julianDay <= 2031864) { return 4; } if (this.julianDay <= 2096664) { return 6; } if (this.julianDay <= 2175864) { return 7; } if (this.julianDay <= 2240664) { return 9; } if (this.julianDay <= 2299160) { return 10; } return 0; }, enumerable: false, configurable: true }); return GregorianCalendarDate; }(western_1.default)); exports.default = GregorianCalendarDate; //# sourceMappingURL=gregorian.js.map