UNPKG

iso-weeks-year

Version:
10 lines 411 B
"use strict"; 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