such wow doge

How to fix one-day-off date errors

When Claude gets more than a few days' worth of calendar data using Google Workspace MCP, it'll sometimes offset dates by a day. It'll mention a non-existent date like Monday 3rd February (instead of Monday 2nd February) and then allocate events to the wrong day.

The fix

Add these instructions to ~/.claude/CLAUDE.md:

### Date verification protocol LLMs are known to make day-of-week calculation errors. When mentioning a specific date in conversation, verify it using bash: ```bash date -j -f "%Y-%m-%d" "2026-01-22" "+%A, %d %B %Y" ``` For times: copy the exact time from the API response (e.g., "16:00"). Do not mentally convert or retype. ### Formatting calendar output When fetching events across multiple days, use `~/.claude/scripts/format-calendar.py` to format and group events by day. Save the raw MCP output as JSON, then pipe through the script: ```bash python3 ~/.claude/scripts/format-calendar.py < /tmp/calendar-data.json ``` This eliminates date errors entirely—the script handles day-of-week mapping and timezone conversion deterministically. For single-event lookups, the date verification protocol above is sufficient.

The Python script takes output from the Google Calendar MCP server, and outputs a schedule that my "chief of staff" skill can return verbatim:

### Monday 03 February 2026
  * 09:0010:00 Team standup
  * 14:0015:30 Project review (Room 3)

### Tuesday 04 February 2026
  * [All day] Public holiday
  * 16:0017:00 1:1 with Sarah

Takeaway: if an LLM is unreliable at a deterministic task, delegate it to a deterministic tool.