1 | import type { LabelOptions } from "../lib/dateLib.js";
|
2 | import { dateLib as defaultDateLib } from "../lib/index.js";
|
3 | import type { DateLib } from "../types/index.js";
|
4 |
|
5 | /**
|
6 | * The ARIA label for the Weekday column header.
|
7 | *
|
8 | * @defaultValue `"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"`
|
9 | * @group Labels
|
10 | * @see https://daypicker.dev/docs/translation#aria-labels
|
11 | */
|
12 | export function labelWeekday(
|
13 | date: Date,
|
14 | options?: LabelOptions,
|
15 | /** @ignore */
|
16 | dateLib: DateLib = defaultDateLib
|
17 | ): string {
|
18 | return dateLib.format(date, "cccc", options);
|
19 | }
|