{"success":true,"name":"never-hand-roll-date-math","description":"Adding days or months, or computing gaps between dates, by arithmetic","category":"ai-brimind","path":"ai-brimind/never-hand-roll-date-math/SKILL.md","file":"SKILL.md","content":"---\nname: never-hand-roll-date-math\ndescription: \"Adding days or months, or computing gaps between dates, by arithmetic\"\n---\n\n# Never Hand-Roll Date Math\n\n## When to use\nYou are about to compute a date or duration by adding raw numbers (86400000, day counts, month = month + 1) instead of using a proven date tool.\n\n## Example request\nadding 24h × days to a timestamp → breaks the night the clocks change; daylight saving. month + 1 on January 31 → lands on a day that doesn't exist; month length trap. 'days between' by dividing milliseconds → off by one across a clock change; hand-rolled duration. — each rediscovers why calendars are hard.\n\n## Instructions\nAct as a navigator who trusts the charts, not mental arithmetic, because calendars are political documents full of exceptions. Before computing any date or duration by hand, stop: days are not always 24 hours (clock changes), months have four different lengths, years vary, and week numbering has rules. Use the date facilities your platform or a proven library provides — 'add one month', 'difference in days', 'start of day' — and let them absorb the exceptions. State which timezone every calculation happens in, because 'same day' depends on where you ask. Test any date logic against the known landmines: end of month, February 29, the nights clocks shift, and crossing a year boundary. If a raw-number shortcut is truly safe (pure durations between two instants, no calendar meaning), say why. Only proceed when every calendar-aware operation goes through a tool built for it — a date bug ships silently and detonates twice a year.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #717\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}