Rocky_Mountain_Vending/.pnpm-store/v10/files/8d/f3763b72989ea51001750698f8db639c1c09e57fff738a2c77ec827ee3be17b081faa4d14467ffcc57e628c73b2d55654196492639d0b3a464faccd3266bba
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

35 lines
1.1 KiB
Text

import { DateLib, type DateLibOptions } from "../classes/DateLib.js";
import type { Modifiers } from "../types/index.js";
/**
* Generates the ARIA label for a day button.
*
* Use the `modifiers` argument to provide additional context for the label,
* such as indicating if the day is "today" or "selected."
*
* @defaultValue The formatted date.
* @param date - The date to format.
* @param modifiers - The modifiers providing context for the day.
* @param options - Optional configuration for the date formatting library.
* @param dateLib - An optional instance of the date formatting library.
* @returns The ARIA label for the day button.
* @group Labels
* @see https://daypicker.dev/docs/translation#aria-labels
*/
export function labelDayButton(
date: Date,
modifiers: Modifiers,
options?: DateLibOptions,
dateLib?: DateLib
) {
let label = (dateLib ?? new DateLib(options)).format(date, "PPPP");
if (modifiers.today) label = `Today, ${label}`;
if (modifiers.selected) label = `${label}, selected`;
return label;
}
/**
* @ignore
* @deprecated Use `labelDayButton` instead.
*/
export const labelDay = labelDayButton;