UNPKG

686 BTypeScriptView Raw
1import type { ContextOptions, DateArg } from "./types.js";
2/**
3 * The {@link getDecade} function options.
4 */
5export interface GetDecadeOptions extends ContextOptions<Date> {}
6/**
7 * @name getDecade
8 * @category Decade Helpers
9 * @summary Get the decade of the given date.
10 *
11 * @description
12 * Get the decade of the given date.
13 *
14 * @param date - The given date
15 * @param options - An object with options
16 *
17 * @returns The year of decade
18 *
19 * @example
20 * // Which decade belongs 27 November 1942?
21 * const result = getDecade(new Date(1942, 10, 27))
22 * //=> 1940
23 */
24export declare function getDecade(
25 date: DateArg<Date> & {},
26 options?: GetDecadeOptions | undefined,
27): number;