iso-weeks-year
Version:
Library to view week numbers for a year
10 lines • 411 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.daysInMonth = void 0;
const internal_error_1 = require("./error/internal-error");
exports.daysInMonth = (month, year) => {
if (month < 0 || month > 11)
throw new internal_error_1.InternalError('Error: invalid month!');
return 32 - new Date(year, month, 32).getDate();
};
//# sourceMappingURL=daysInMonth.js.map