UNPKG

@drewsonne/maya-dates

Version:

Typescript package to manipulate dates in the Maya Calendar

64 lines 2.32 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 JulianCalendarDate = (function (_super) { __extends(JulianCalendarDate, _super); function JulianCalendarDate() { return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(JulianCalendarDate.prototype, "offset", { get: function () { if (this.julianDay === 2299160) { return 0; } if (this.julianDay > 2463863) { return -13; } if (this.julianDay > 2415078) { return -12; } if (this.julianDay > 2378554) { return -11; } if (this.julianDay > 2312663) { return -10; } if (this.julianDay > 2240663) { return 0; } if (this.julianDay > 2232466) { return -1; } if (this.julianDay > 2175863) { return 0; } if (this.julianDay > 2096663) { return 1; } return 0; }, enumerable: false, configurable: true }); return JulianCalendarDate; }(western_1.default)); exports.default = JulianCalendarDate; //# sourceMappingURL=julian.js.map