date-manip
Version:
A lightweight JavaScript date utility library that provides modularity, high performance, and additional features. It supports various date operations, including date addition and subtraction, formatting, comparison, etc.
9 lines (8 loc) • 309 B
JavaScript
;
const isLeapYear = require("./isLeapYear-CZo5eAQg.js");
const arr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
const arr2 = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
function daysOfYear(year) {
return isLeapYear.isLeapYear(year) ? arr2 : arr;
}
exports.daysOfYear = daysOfYear;