iso-weeks-year
Version:
Library to view week numbers for a year
21 lines • 618 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSixDays = void 0;
const daysInMonth_1 = require("./daysInMonth");
const treat_1 = require("./treat");
exports.getSixDays = (month, year, last = true) => {
if (!last)
return [1, 2, 3, 4, 5, 6];
month = treat_1.treatMonth(month);
year = treat_1.treatYear(month, year);
const lastDay = daysInMonth_1.daysInMonth(month, year);
return [
lastDay - 5,
lastDay - 4,
lastDay - 3,
lastDay - 2,
lastDay - 1,
lastDay,
];
};
//# sourceMappingURL=getSixDays.js.map