@drewsonne/maya-dates
Version:
Typescript package to manipulate dates in the Maya Calendar
40 lines • 1.78 kB
JavaScript
;
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 __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var comment_wrapper_1 = require("../comment-wrapper");
var LongcountOperation = (function (_super) {
__extends(LongcountOperation, _super);
function LongcountOperation(lcClass, a, b) {
var _this = _super.call(this) || this;
_this.a = a;
_this.b = b;
_this.LcClass = lcClass;
return _this;
}
LongcountOperation.prototype.buildOperationComponents = function () {
var aLen = this.a.parts.length;
var bLen = this.b.parts.length;
var length = Math.max(aLen, bLen);
var aParts = this.a.parts.concat(new Array(length - aLen).fill(0));
var bParts = this.b.parts.concat(new Array(length - bLen).fill(0));
var isInverted = this.a.lt(this.b);
return [aParts, bParts, isInverted];
};
return LongcountOperation;
}(comment_wrapper_1.CommentWrapper));
exports.default = LongcountOperation;
//# sourceMappingURL=longcount-operation.js.map