MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / toDateString

Function toDateString

src/utils/statsCache.ts:403–410  ·  view source on GitHub ↗
(date: Date)

Source from the content-addressed store, hash-verified

401 * Extract the date portion (YYYY-MM-DD) from a Date object.
402 */
403export function toDateString(date: Date): string {
404 const parts = date.toISOString().split('T')
405 const dateStr = parts[0]
406 if (!dateStr) {
407 throw new Error('Invalid ISO date string')
408 }
409 return dateStr
410}
411
412/**
413 * 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