MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / toDateString

Function toDateString

source code/utils/statsCache.ts:405–412  ·  view source on GitHub ↗
(date: Date)

Source from the content-addressed store, hash-verified

403 * Extract the date portion (YYYY-MM-DD) from a Date object.
404 */
405export function toDateString(date: Date): string {
406 const parts = date.toISOString().split('T')
407 const dateStr = parts[0]
408 if (!dateStr) {
409 throw new Error('Invalid ISO date string')
410 }
411 return dateStr
412}
413
414/**
415 * Get today's date in YYYY-MM-DD format.

Callers 8

processSessionFilesFunction · 0.85
getNextDayFunction · 0.85
calculateStreaksFunction · 0.85
readSessionStartDateFunction · 0.85
generateHeatmapFunction · 0.85
getTodayDateStringFunction · 0.85
getYesterdayDateStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected