UNPKG

639 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.labelGridcell = labelGridcell;
4const index_js_1 = require("../lib/index.js");
5/**
6 * The label for the day gridcell when the calendar is not interactive.
7 *
8 * @group Labels
9 * @see https://daypicker.dev/docs/translation#aria-labels
10 */
11function labelGridcell(date,
12/** The modifiers for the day. */
13modifiers, options,
14/** @ignore */
15dateLib = index_js_1.dateLib) {
16 let label = dateLib.format(date, "PPPP", options);
17 if (modifiers?.today) {
18 label = `Today, ${label}`;
19 }
20 return label;
21}
22//# sourceMappingURL=labelGridcell.js.map
\No newline at end of file