getWeekdayNames
Calendar
stable
Returns an ordered array of localised weekday name strings for a given locale and first-day-of-week offset. The output is already rotated so the first element corresponds to firstDayOfWeek.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- localerequisstring
- BCP 47 locale tag used by Intl.DateTimeFormat to format the day names.
- firstDayOfWeekrequisnumber
- Zero-based index of the first day of the week (0 = Sunday, 1 = Monday, …). The returned array is rotated accordingly.
- length'narrow' | 'short' | 'long''short'
- Intl.DateTimeFormat weekday format: "narrow" (M), "short" (Mon), or "long" (Monday). Defaults to "short".
API
Valeur de retour
La valeur retournée par cet util.
- An array of 7 localised weekday name strings, rotated so the first element matches firstDayOfWeek.
Usage
Exemples
Extraits de code prêts à coller.
Short names starting on Monday (French)