Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/netzo/deps/react-day-picker.ts>isMatch

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
function isMatch
import { isMatch } from "https://deno.land/x/netzo@0.5.14/deps/react-day-picker.ts";

Returns whether a day matches against at least one of the given Matchers.

const day = new Date(2022, 5, 19);
const matcher1: DateRange = {
   from: new Date(2021, 12, 21),
   to: new Date(2021, 12, 30)
}
const matcher2: DateRange = {
   from: new Date(2022, 5, 1),
   to: new Date(2022, 5, 23)
}

const isMatch(day, [matcher1, matcher2]); // true, since day is in the matcher1 range.

Parameters

day: Date
matchers: Matcher[]

Returns

boolean