(date: globalThis.Date)
| 8366 | } |
| 8367 | |
| 8368 | function encodeDatePayload(date: globalThis.Date): string { |
| 8369 | if (globalThis.Number.isNaN(date.getTime())) { |
| 8370 | throw new globalThis.RangeError(`Expected a valid Date, got ${format(date)}`) |
| 8371 | } |
| 8372 | return date.toISOString() |
| 8373 | } |
| 8374 | |
| 8375 | function formatDateRuntime(date: globalThis.Date): string { |
| 8376 | return `new Date(${format(date.getTime())})` |