Files
NapCatQQ/.pnpm-store/v3/files/c5/39d6b8987b16d67e40ba178aeec2651bc83789190c3e69b91ac796cd784209b559218813521344377b832cae7a93c82f23ff861ce488ef2062227c84522172
T
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

15 lines
348 B
Plaintext

import { isNumber } from "./isNumber.mjs";
import { isValidDate } from "./isValidDate.mjs";
function isLeapYear(value) {
let year = value;
if (isValidDate(value)) {
year = value.getFullYear();
} else if (!isNumber(value)) {
return false;
}
return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
}
export {
isLeapYear
};