From d55b767039605256c736166a942a9138e3eacfd7 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Sun, 29 Jun 2025 11:49:28 -0700 Subject: remove dev node_modules (oops) --- .../date-fns/esm/isWithinInterval/index.js | 53 ---------------------- 1 file changed, 53 deletions(-) delete mode 100644 node_modules/date-fns/esm/isWithinInterval/index.js (limited to 'node_modules/date-fns/esm/isWithinInterval/index.js') diff --git a/node_modules/date-fns/esm/isWithinInterval/index.js b/node_modules/date-fns/esm/isWithinInterval/index.js deleted file mode 100644 index f8fd012..0000000 --- a/node_modules/date-fns/esm/isWithinInterval/index.js +++ /dev/null @@ -1,53 +0,0 @@ -import toDate from "../toDate/index.js"; -import requiredArgs from "../_lib/requiredArgs/index.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.) - * - * @param {Date|Number} date - the date to check - * @param {Interval} interval - the interval to check - * @returns {Boolean} the date is within the interval - * @throws {TypeError} 2 arguments required - * @throws {RangeError} The start of an interval cannot be after its end - * @throws {RangeError} Date in interval cannot be `Invalid Date` - * - * @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 default function isWithinInterval(dirtyDate, interval) { - requiredArgs(2, arguments); - var time = toDate(dirtyDate).getTime(); - var startTime = toDate(interval.start).getTime(); - var endTime = toDate(interval.end).getTime(); - - // Throw an exception if start date is after end date or if any date is `Invalid Date` - if (!(startTime <= endTime)) { - throw new RangeError('Invalid interval'); - } - return time >= startTime && time <= endTime; -} \ No newline at end of file -- cgit v1.2.3