Files
SnowLuma/.pnpm-store/v11/files/c0/21ba48cb05086ec5793fa0de538801848092470c231be838981c6fe97565e254918ff298f38a06967c8c7960190cde3e87e411f1d638572517a1847dab3200
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +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;