ngx-bootstrap
Version:
Native Angular Bootstrap Components
23 lines • 795 B
JavaScript
export function createUTCDate(y, m, d) {
var date = new Date(Date.UTC.apply(null, arguments));
// the Date.UTC function remaps years 0-99 to 1900-1999
if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
date.setUTCFullYear(y);
}
return date;
}
export function createDate(y, m, d, h, M, s, ms) {
if (m === void 0) { m = 0; }
if (d === void 0) { d = 1; }
if (h === void 0) { h = 0; }
if (M === void 0) { M = 0; }
if (s === void 0) { s = 0; }
if (ms === void 0) { ms = 0; }
var date = new Date(y, m, d, h, M, s, ms);
// the date constructor remaps years 0-99 to 1900-1999
if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
date.setFullYear(y);
}
return date;
}
//# sourceMappingURL=date-from-array.js.map