@angular/commoncode
getLocaleFirstDayOfWeek
function
deprecatedsince v18
Retrieves the first day of the week for the given locale.
Internationalization (i18n) GuideOn this page
API
function getLocaleFirstDayOfWeek(locale: string): WeekDay;@paramlocale
stringA locale code for the locale format rules to use.
@returns
WeekDayA day index number, using the 0-based week-day index for en-US
(Sunday = 0, Monday = 1, ...).
For example, for fr-FR, returns 1 to indicate that the first day is Monday.
Jump to details