( locale: string, formStyle: FormStyle, width: TranslationWidth, )
| 276 | * Use `Intl.DateTimeFormat` for date formating instead. |
| 277 | */ |
| 278 | export function getLocaleDayPeriods( |
| 279 | locale: string, |
| 280 | formStyle: FormStyle, |
| 281 | width: TranslationWidth, |
| 282 | ): Readonly<[string, string]> { |
| 283 | const data = ɵfindLocaleData(locale); |
| 284 | const amPmData = <[string, string][][]>[ |
| 285 | data[ɵLocaleDataIndex.DayPeriodsFormat], |
| 286 | data[ɵLocaleDataIndex.DayPeriodsStandalone], |
| 287 | ]; |
| 288 | const amPm = getLastDefinedValue(amPmData, formStyle); |
| 289 | return getLastDefinedValue(amPm, width); |
| 290 | } |
| 291 | |
| 292 | /** |
| 293 | * Retrieves days of the week for the given locale, using the Gregorian calendar. |
no test coverage detected