(offset: number, delimiter: string = "")
| 767 | }; |
| 768 | |
| 769 | function formatTimezoneShort(offset: number, delimiter: string = ""): string { |
| 770 | const sign = offset > 0 ? "-" : "+"; |
| 771 | const absOffset = Math.abs(offset); |
| 772 | const hours = Math.trunc(absOffset / 60); |
| 773 | const minutes = absOffset % 60; |
| 774 | if (minutes === 0) { |
| 775 | return sign + String(hours); |
| 776 | } |
| 777 | return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2); |
| 778 | } |
| 779 | |
| 780 | function formatTimezoneWithOptionalMinutes( |
| 781 | offset: number, |
no test coverage detected