1 | import type { ContextOptions, DateArg } from "./types.js";
|
2 | /**
|
3 | * The {@link isSameMonth} function options.
|
4 | */
|
5 | export interface IsSameMonthOptions extends ContextOptions<Date> {}
|
6 | /**
|
7 | * @name isSameMonth
|
8 | * @category Month Helpers
|
9 | * @summary Are the given dates in the same month (and year)?
|
10 | *
|
11 | * @description
|
12 | * Are the given dates in the same month (and year)?
|
13 | *
|
14 | * @param laterDate - The first date to check
|
15 | * @param earlierDate - The second date to check
|
16 | * @param options - An object with options
|
17 | *
|
18 | * @returns The dates are in the same month (and year)
|
19 | *
|
20 | * @example
|
21 | * // Are 2 September 2014 and 25 September 2014 in the same month?
|
22 | * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))
|
23 | * //=> true
|
24 | *
|
25 | * @example
|
26 | * // Are 2 September 2014 and 25 September 2015 in the same month?
|
27 | * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))
|
28 | * //=> false
|
29 | */
|
30 | export declare function isSameMonth(
|
31 | laterDate: DateArg<Date> & {},
|
32 | earlierDate: DateArg<Date> & {},
|
33 | options?: IsSameMonthOptions | undefined,
|
34 | ): boolean;
|