v1.0 with SW PWA enabled
This commit is contained in:
46
frontend/node_modules/date-fns/isWithinInterval.d.mts
generated
vendored
Normal file
46
frontend/node_modules/date-fns/isWithinInterval.d.mts
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
import type { Interval } from "./types.js";
|
||||
/**
|
||||
* @name isWithinInterval
|
||||
* @category Interval Helpers
|
||||
* @summary Is the given date within the interval?
|
||||
*
|
||||
* @description
|
||||
* Is the given date within the interval? (Including start and end.)
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
*
|
||||
* @param date - The date to check
|
||||
* @param interval - The interval to check
|
||||
*
|
||||
* @returns The date is within the interval
|
||||
*
|
||||
* @example
|
||||
* // For the date within the interval:
|
||||
* isWithinInterval(new Date(2014, 0, 3), {
|
||||
* start: new Date(2014, 0, 1),
|
||||
* end: new Date(2014, 0, 7)
|
||||
* })
|
||||
* //=> true
|
||||
*
|
||||
* @example
|
||||
* // For the date outside of the interval:
|
||||
* isWithinInterval(new Date(2014, 0, 10), {
|
||||
* start: new Date(2014, 0, 1),
|
||||
* end: new Date(2014, 0, 7)
|
||||
* })
|
||||
* //=> false
|
||||
*
|
||||
* @example
|
||||
* // For date equal to interval start:
|
||||
* isWithinInterval(date, { start, end: date })
|
||||
* // => true
|
||||
*
|
||||
* @example
|
||||
* // For date equal to interval end:
|
||||
* isWithinInterval(date, { start: date, end })
|
||||
* // => true
|
||||
*/
|
||||
export declare function isWithinInterval<DateType extends Date>(
|
||||
date: DateType | number | string,
|
||||
interval: Interval<DateType>,
|
||||
): boolean;
|
||||
Reference in New Issue
Block a user