* Convert to ISO string with timezone offset.
()
| 459 | * Convert to ISO string with timezone offset. |
| 460 | */ |
| 461 | public toString(): string { |
| 462 | const h = String(this.#hour).padStart(2, "0"); |
| 463 | const m = String(this.#minute).padStart(2, "0"); |
| 464 | const s = String(this.#second).padStart(2, "0"); |
| 465 | |
| 466 | let timeStr = `${h}:${m}:${s}`; |
| 467 | if (this.#nanosecond > 0) { |
| 468 | let nanos = String(this.#nanosecond).padStart(9, "0"); |
| 469 | nanos = nanos.replace(/0+$/, ""); |
| 470 | timeStr += `.${nanos}`; |
| 471 | } |
| 472 | |
| 473 | return timeStr + this.#formatOffset(); |
| 474 | } |
| 475 | |
| 476 | public compareTo(other: TimeValue): number { |
| 477 | // Compare by normalized UTC time |
nothing calls this directly
no test coverage detected