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) Canceled after 0s
27 lines
716 B
Plaintext
27 lines
716 B
Plaintext
/**
|
|
* Check if the year is a leap year
|
|
*
|
|
* 校验是否为闰年
|
|
*
|
|
* @example
|
|
* ```js
|
|
* import { isLeapYear } from 'is-what-type';
|
|
*
|
|
* isLeapYear(2000); // true
|
|
* isLeapYear(2020); // true
|
|
* isLeapYear(1900); // false
|
|
* isLeapYear(2021); // false
|
|
* isLeapYear(new Date(2000, 0, 1)); // true
|
|
* isLeapYear(new Date(2020, 0, 1)); // true
|
|
* isLeapYear(new Date(1900, 0, 1)); // false
|
|
* isLeapYear(new Date(2021, 0, 1)); // false
|
|
* isLeapYear('2000'); // false
|
|
* isLeapYear(null); // false
|
|
* isLeapYear(undefined); // false
|
|
* ```
|
|
*
|
|
* @param value - The value to check
|
|
* @returns `true` if the value is a leap year, `false` otherwise
|
|
*/
|
|
export declare function isLeapYear(value: unknown): boolean;
|