Files
SnowLuma/.pnpm-store/v11/files/e9/e687ecd0afe7eba6fc2745a453aad1c10ddb335b54842a9976b57db583b3c62e75c0e992fdead27e6376dc1207f2a3a8a89e39fe73439bb5a6865722fb0615
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

15 lines
464 B
Plaintext

"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const isNumber = require("./isNumber.js");
const isValidDate = require("./isValidDate.js");
function isLeapYear(value) {
let year = value;
if (isValidDate.isValidDate(value)) {
year = value.getFullYear();
} else if (!isNumber.isNumber(value)) {
return false;
}
return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
}
exports.isLeapYear = isLeapYear;