MCPcopy Create free account
hub / github.com/bjsi/incremental-everything / getLocalDateKey

Function getLocalDateKey

src/lib/queue_aggregates.ts:30–36  ·  view source on GitHub ↗
(timestamp: number)

Source from the content-addressed store, hash-verified

28}
29
30export 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
38export function rawCutoffDateKey(now: number = Date.now()): string {
39 return getLocalDateKey(now - RAW_SESSION_WINDOW_DAYS * 86400000);

Callers 9

processHistorySlotsFunction · 0.90
logAuthoritativeDiffFunction · 0.90
PracticedQueuesFunction · 0.90
rawCutoffDateKeyFunction · 0.85
bucketSessionFunction · 0.85
rollOverOldSessionsFunction · 0.85
aggregatePeriodStatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected