Rocky_Mountain_Vending/.pnpm-store/v10/files/9c/d68929e695642118152b224cfa50f01c645f93857cd85776ef3ee2b4d52d33db8d0ecf28151f9c36ff20d33d54ad5ac537da7cdb4379fea68584885ce09787
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

31 lines
750 B
Text

import { toDate } from "./toDate.js";
/**
* The {@link isWeekend} function options.
*/
/**
* @name isWeekend
* @category Weekday Helpers
* @summary Does the given date fall on a weekend?
*
* @description
* Does the given date fall on a weekend? A weekend is either Saturday (`6`) or Sunday (`0`).
*
* @param date - The date to check
* @param options - An object with options
*
* @returns The date falls on a weekend
*
* @example
* // Does 5 October 2014 fall on a weekend?
* const result = isWeekend(new Date(2014, 9, 5))
* //=> true
*/
export function isWeekend(date, options) {
const day = toDate(date, options?.in).getDay();
return day === 0 || day === 6;
}
// Fallback for modularized imports:
export default isWeekend;