Files
NapCatQQ/.pnpm-store/v3/files/c0/21ba48cb05086ec5793fa0de538801848092470c231be838981c6fe97565e254918ff298f38a06967c8c7960190cde3e87e411f1d638572517a1847dab3200
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

21 lines
817 B
Plaintext

/**
* Checks if a given date is in a leap year.
* 检查给定的日期是否在闰年。
*
* @param date - The date to check. (要检查的日期。)
* @returns A boolean indicating whether the given date is in a leap year. (布尔值,表示给定的日期是否在闰年。)
* @example
* ```ts
* // Checking if a date is in a leap year (检查一个日期是否在闰年)
* const date1 = new Date('2024-01-01');
* const isLeap = isLeapYear(date1);
* console.log(isLeap); // Outputs: true (输出: true)
*
* // Checking if a date is not in a leap year (检查一个日期是否不在闰年)
* const date2 = new Date('2023-01-01');
* const isNotLeap = isLeapYear(date2);
* console.log(isNotLeap); // Outputs: false (输出: false)
* ```
*/
export default function isLeapYear(date: Date): boolean;