(atMs: number)
| 52 | |
| 53 | /** UTC YYYY-MM-DD — the key every event, rollup and chart is bucketed on. */ |
| 54 | export function utcDay(atMs: number): string { |
| 55 | return new Date(atMs).toISOString().slice(0, 10); |
| 56 | } |
| 57 | |
| 58 | /** Rejects both the wrong shape and impossible dates (`2026-02-31` round-trips as `2026-03-03`). */ |
| 59 | export function isValidDay(day: string): boolean { |
no outgoing calls
no test coverage detected