()
| 2 | |
| 3 | // This ensures you get the LOCAL date in ISO format |
| 4 | export 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 |
no outgoing calls
no test coverage detected