UNPKG

747 BTypeScriptView Raw
1import { type DateLib } from "../classes/DateLib.js";
2import type { Matcher } from "../types/index.js";
3/**
4 * Returns whether a range contains dates that match the given modifiers.
5 *
6 * ```tsx
7 * const range: DateRange = {
8 * from: new Date(2021, 12, 21),
9 * to: new Date(2021, 12, 30)
10 * };
11 * const matcher1: Date = new Date(2021, 12, 21);
12 * const matcher2: DateRange = {
13 * from: new Date(2022, 5, 1),
14 * to: new Date(2022, 5, 23)
15 * };
16 * rangeContainsModifiers(range, [matcher1, matcher2]); // true, since matcher1 is in the date.
17 * ```
18 *
19 * @since 9.2.2
20 * @group Utilities
21 */
22export declare function rangeContainsModifiers(range: {
23 from: Date;
24 to: Date;
25}, modifiers: Matcher | Matcher[], dateLib?: DateLib): boolean;