* Returns the timezone offset, in minutes, for the given instant * (local - UTC). e.g. New York in winter (EST) returns -300.
(date: Date, timezone?: string)
| 49 | * (local - UTC). e.g. New York in winter (EST) returns -300. |
| 50 | */ |
| 51 | function getOffsetMinutes(date: Date, timezone?: string): number { |
| 52 | const offset = parseOffsetMinutes(getTimezoneGMT(date, timezone).replace(/^GMT/, '') || 'Z'); |
| 53 | return offset ?? 0; |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * Returns true if the given instant, read back in the timezone, matches the |
no test coverage detected