The city/locale portion of an IANA id, formatted for display (e.g. `Los Angeles`).
(timeZone: string)
| 46 | |
| 47 | /** The city/locale portion of an IANA id, formatted for display (e.g. `Los Angeles`). */ |
| 48 | function timezoneCity(timeZone: string): string { |
| 49 | return (timeZone.split('/').pop() ?? timeZone).replace(/_/g, ' ') |
| 50 | } |
| 51 | |
| 52 | /** `GMT±HH:MM` for an offset expressed in minutes east of UTC (e.g. `GMT-08:00`). */ |
| 53 | function formatGmtOffset(offsetMinutes: number): string { |
no test coverage detected