@codecademy/gamut
68.2.268.2.3-alpha.93a7da.0
dist/DatePicker/DatePickerCalendar/Calendar/utils/format.d.ts+
dist/DatePicker/DatePickerCalendar/Calendar/utils/format.d.tsNew file+41
Index: package/dist/DatePicker/DatePickerCalendar/Calendar/utils/format.d.ts
===================================================================
--- package/dist/DatePicker/DatePickerCalendar/Calendar/utils/format.d.ts
+++ package/dist/DatePicker/DatePickerCalendar/Calendar/utils/format.d.ts
@@ -0,0 +1,41 @@
+import type { IsoWeekday } from '../../../utils/locale';
+/**
+ * Capitalize the first character of a string using the locale; rest unchanged (e.g. "next month" → "Next month").
+ */
+export declare const capitalizeFirst: ({ str, locale, }: {
+ str: string;
+ locale: Intl.Locale;
+}) => string;
+/**
+ * Format month and year for the calendar header (e.g. "February 2026").
+ */
+export declare const formatMonthYear: ({ date, locale, }: {
+ date: Date;
+ locale: Intl.Locale;
+}) => string;
+/**
+ * Get weekday names for column headers or abbr attributes.
+ * Column order follows `firstWeekday` (ISO 1 = Monday … 7 = Sunday), matching `Intl.Locale#getWeekInfo().firstDay`.
+ * @param format - 'short' for abbreviated (e.g. "Su", "Mo"), 'long' for full (e.g. "Sunday", "Monday")
+ */
+export declare const getWeekdayNames: ({ format, locale, firstWeekday, }: {
+ format: "short" | "long";
+ locale: Intl.Locale;
+ firstWeekday: IsoWeekday;
+}) => string[];
+/**
+ * Get localized "next month" and "previous month" labels for calendar nav.
+ * Uses Intl.RelativeTimeFormat with numeric: "auto" (e.g. "next month", "last month").
+ */
+export declare const getRelativeMonthLabels: (locale: Intl.Locale) => {
+ nextMonth: string;
+ lastMonth: string;
+};
+/**
+ * Get localized "today" label (e.g. "today").
+ */
+export declare const getRelativeTodayLabel: (locale: Intl.Locale) => string;
+export declare const formatDateForAriaLabel: ({ date, locale, }: {
+ date: Date;
+ locale: Intl.Locale;
+}) => string;