qms-js
Version:
A common library that can be used for fe and be
21 lines • 650 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var HOURS = 60 * 60 * 1000;
Date.prototype.addHours = function (hours) {
this.setTime(this.getTime() + (hours * HOURS));
return this;
};
Date.prototype.addDays = function (days) {
this.setTime(this.getTime() + (days * 24 * HOURS));
return this;
};
Date.utc = function () {
var now = new Date();
return new Date(now.toUTCString());
};
Date.utcByDays = function (days) {
if (days === void 0) { days = 0; }
var date = new Date();
return new Date(date.addDays(days).toISOString());
};
//# sourceMappingURL=datetime.js.map