()
| 30 | const dictionary = new LocalizedStringDictionary(i18nMessages); |
| 31 | |
| 32 | function getLocale() { |
| 33 | // Match browser language setting here, NOT react-aria's I18nProvider, so that we match other browser-provided |
| 34 | // validation messages, which to not respect our provider's language. |
| 35 | let locale = |
| 36 | // @ts-ignore |
| 37 | (typeof navigator !== 'undefined' && (navigator.language || navigator.userLanguage)) || 'en-US'; |
| 38 | |
| 39 | try { |
| 40 | Intl.DateTimeFormat.supportedLocalesOf([locale]); |
| 41 | } catch { |
| 42 | locale = 'en-US'; |
| 43 | } |
| 44 | return locale; |
| 45 | } |
| 46 | |
| 47 | export function getValidationResult( |
| 48 | value: DateValue | null, |
no outgoing calls
no test coverage detected