MCPcopy
hub / github.com/claude-code-best/claude-code / getLocalISODate

Function getLocalISODate

src/constants/common.ts:4–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2
3// This ensures you get the LOCAL date in ISO format
4export function getLocalISODate(): string {
5 // Check for ant-only date override
6 if (process.env.CLAUDE_CODE_OVERRIDE_DATE) {
7 return process.env.CLAUDE_CODE_OVERRIDE_DATE
8 }
9
10 const now = new Date()
11 const year = now.getFullYear()
12 const month = String(now.getMonth() + 1).padStart(2, '0')
13 const day = String(now.getDate()).padStart(2, '0')
14 return `${year}-${month}-${day}`
15}
16
17// Memoized for prompt-cache stability — captures the date once at session start.
18// The main interactive path gets this behavior via memoize(getUserContext) in

Callers 2

context.tsFile · 0.85
getDateChangeAttachmentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected