// The day it is where the person is. Everything the UI stamps with "today" — a // journal note, a placed or filled plant — uses the browser's local date, // because a gardener planting at 9 pm in Ohio planted today, not (in UTC) // tomorrow. The server's own defaults are UTC and only apply when a date is // omitted, which is for API callers and the agent; the UI never omits one. /** Today as YYYY-MM-DD in the browser's local time zone. */ export function today(now = new Date()): string { const pad = (n: number) => String(n).padStart(2, '0') return `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}` }