UNPKG

649 BTypeScriptView Raw
1import type { ContextOptions, DateArg } from "./types.js";
2export interface IsLeapYearOptions extends ContextOptions<Date> {}
3/**
4 * @name isLeapYear
5 * @category Year Helpers
6 * @summary Is the given date in the leap year?
7 *
8 * @description
9 * Is the given date in the leap year?
10 *
11 * @param date - The date to check
12 * @param options - The options object
13 *
14 * @returns The date is in the leap year
15 *
16 * @example
17 * // Is 1 September 2012 in the leap year?
18 * const result = isLeapYear(new Date(2012, 8, 1))
19 * //=> true
20 */
21export declare function isLeapYear(
22 date: DateArg<Date> & {},
23 options?: IsLeapYearOptions | undefined,
24): boolean;