MCPcopy Index your code
hub / github.com/codeaashu/claude-code / convertFileNameToDate

Function convertFileNameToDate

src/utils/cleanup.ts:48–53  ·  view source on GitHub ↗
(filename: string)

Source from the content-addressed store, hash-verified

46}
47
48export function convertFileNameToDate(filename: string): Date {
49 const isoStr = filename
50 .split('.')[0]!
51 .replace(/T(\d{2})-(\d{2})-(\d{2})-(\d{3})Z/, 'T$1:$2:$3.$4Z')
52 return new Date(isoStr)
53}
54
55async function cleanupOldFilesInDirectory(
56 dirPath: string,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected