(locale = 'en')
| 56 | } |
| 57 | |
| 58 | export function shouldPolyfill(locale = 'en'): string | undefined { |
| 59 | if ( |
| 60 | typeof Intl === 'undefined' || |
| 61 | !('DateTimeFormat' in Intl) || |
| 62 | !('formatToParts' in Intl.DateTimeFormat.prototype) || |
| 63 | !('formatRange' in Intl.DateTimeFormat.prototype) || |
| 64 | hasChromeLt71Bug() || |
| 65 | hasUnthrownDateTimeStyleBug() || |
| 66 | !supportsDateStyle() || |
| 67 | !supportedLocalesOf(locale) |
| 68 | ) { |
| 69 | return locale ? match([locale], supportedLocales, 'en') : undefined |
| 70 | } |
| 71 | } |
no test coverage detected