UNPKG

833 BTypeScriptView Raw
1import { type DateLib } from "../classes/DateLib.js";
2import type { Matcher } from "../types/index.js";
3/**
4 * Returns whether a day matches against at least one of the given
5 * {@link Matcher}.
6 *
7 * ```tsx
8 * const date = new Date(2022, 5, 19);
9 * const matcher1: DateRange = {
10 * from: new Date(2021, 12, 21),
11 * to: new Date(2021, 12, 30)
12 * };
13 * const matcher2: DateRange = {
14 * from: new Date(2022, 5, 1),
15 * to: new Date(2022, 5, 23)
16 * };
17 * dateMatchModifiers(date, [matcher1, matcher2]); // true, since day is in the matcher1 range.
18 * ```
19 *
20 * @group Utilities
21 */
22export declare function dateMatchModifiers(date: Date, matchers: Matcher | Matcher[], dateLib?: DateLib): boolean;
23/**
24 * @private
25 * @deprecated Use {@link dateMatchModifiers} instead.
26 */
27export declare const isMatch: typeof dateMatchModifiers;