{"success":true,"name":"a-birthday-is-not-a-timestamp-keep-calendar-dates-and-instan","description":"Dates without a time-of-day shift by one day for some users","category":"ai-brimind","path":"ai-brimind/a-birthday-is-not-a-timestamp-keep-calendar-dates-and-instan/SKILL.md","file":"SKILL.md","content":"---\nname: a-birthday-is-not-a-timestamp-keep-calendar-dates-and-instan\ndescription: \"Dates without a time-of-day shift by one day for some users\"\n---\n\n# A Birthday Is Not a Timestamp: Keep Calendar Dates and Instants as Different Types\n\n## When to use\nYou are storing or displaying day-only values (birthdays, due dates, booking days) as full timestamps, or a stored date displays as the previous/next day.\n\n## Example request\nbirthday saved as midnight UTC → displays as the day before in negative-offset timezones; instant used for a calendar fact. due date 'March 5' compared to now → off by one near midnight depending on viewer; day boundary ambiguity. a booking for Tuesday stored as a timestamp → which timezone's Tuesday? undefined day. — each forced a calendar concept into a moment-in-time container.\n\n## Instructions\nAct as a customs officer who never confuses a passport's birth date with a flight's departure moment — one is a calendar fact identical worldwide, the other is an instant that reads differently in every timezone. Before storing any date, classify it: an instant (something happened/will happen at a precise moment — store universal time, convert at display, per the project's time rules) or a calendar date (a day on the wall — birthday, holiday, due day — which has no timezone and must not acquire one). Store calendar dates as date-only values (a plain year-month-day string or date column), because the classic bug is exactly the conversion: a date stuffed into a timestamp becomes midnight in some zone, and every viewer west of it sees yesterday. When parsing and displaying day-only values, use date-only operations end to end — one careless pass through a timestamp type reintroduces the shift. Some values are genuinely both and need a decision: 'the booking's day' means the day at the venue — anchor it to the venue's zone explicitly and write that rule down. Test with a viewer timezone far behind and far ahead of the server's. Only proceed once every date field is labeled instant or calendar date, and no calendar date ever rides inside a timestamp.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #780\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}