Rocky_Mountain_Vending/.pnpm-store/v10/files/07/8b6e3cb49998ec6ceee265261a79b6def364b0c37b5c6830b0267ce5473893d182321ed83875d82c382a4f6613edc7b8bcef4a64e4e3277d2ecc9f6b068519
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

26 lines
848 B
Text

import { defaultDateLib } from "../classes/index.js";
import { rangeIncludesDate } from "./rangeIncludesDate.js";
/**
* Determines if two date ranges overlap.
*
* @since 9.2.2
* @param rangeLeft - The first date range.
* @param rangeRight - The second date range.
* @param dateLib - The date utility library instance.
* @returns `true` if the ranges overlap, otherwise `false`.
* @group Utilities
*/
export function rangeOverlaps(
rangeLeft: { from: Date; to: Date },
rangeRight: { from: Date; to: Date },
dateLib = defaultDateLib
): boolean {
return (
rangeIncludesDate(rangeLeft, rangeRight.from, false, dateLib) ||
rangeIncludesDate(rangeLeft, rangeRight.to, false, dateLib) ||
rangeIncludesDate(rangeRight, rangeLeft.from, false, dateLib) ||
rangeIncludesDate(rangeRight, rangeLeft.to, false, dateLib)
);
}