(formatOptions: Intl.DateTimeFormatOptions)
| 17 | * confusion. |
| 18 | */ |
| 19 | export const stripTimeZone = (formatOptions: Intl.DateTimeFormatOptions): Intl.DateTimeFormatOptions => { |
| 20 | return { |
| 21 | ...formatOptions, |
| 22 | /** |
| 23 | * Setting the time zone to UTC ensures that the value shown is always the |
| 24 | * same as what was selected and safeguards against older Safari bugs with |
| 25 | * Intl.DateTimeFormat. |
| 26 | */ |
| 27 | timeZone: 'UTC', |
| 28 | /** |
| 29 | * We do not want to display the time zone name |
| 30 | */ |
| 31 | timeZoneName: undefined, |
| 32 | }; |
| 33 | }; |
| 34 | |
| 35 | export const getLocalizedTime = ( |
| 36 | locale: string, |
no outgoing calls
no test coverage detected