UNPKG

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