* Get the epoch seconds (seconds since 1970-01-01T00:00:00Z).
()
| 902 | * Get the epoch seconds (seconds since 1970-01-01T00:00:00Z). |
| 903 | */ |
| 904 | public get epochSeconds(): number { |
| 905 | const date = new Date( |
| 906 | Date.UTC(this.#year, this.#month - 1, this.#day, this.#hour, this.#minute, this.#second), |
| 907 | ); |
| 908 | // Adjust for timezone offset |
| 909 | const ms = date.getTime() - this.#offsetSeconds * 1000; |
| 910 | return Math.floor(ms / 1000) + Math.floor(this.#nanosecond / 1_000_000_000); |
| 911 | } |
| 912 | |
| 913 | /** |
| 914 | * Get the epoch milliseconds (milliseconds since 1970-01-01T00:00:00Z). |
nothing calls this directly
no outgoing calls
no test coverage detected