(timestamp: number)
| 28 | } |
| 29 | |
| 30 | export function getLocalDateKey(timestamp: number): string { |
| 31 | const d = new Date(timestamp); |
| 32 | const y = d.getFullYear(); |
| 33 | const m = String(d.getMonth() + 1).padStart(2, '0'); |
| 34 | const day = String(d.getDate()).padStart(2, '0'); |
| 35 | return `${y}-${m}-${day}`; |
| 36 | } |
| 37 | |
| 38 | export function rawCutoffDateKey(now: number = Date.now()): string { |
| 39 | return getLocalDateKey(now - RAW_SESSION_WINDOW_DAYS * 86400000); |
no outgoing calls
no test coverage detected