Skip to content
Notes

A date string is not an instant

Field notes published a day early for everyone west of Greenwich.

Rough noteWritten

Written once, in the moment. I have not gone back over it.

Every field note carries a date in its frontmatter, written as 2026-07-31. The loader turned that into a Date and the page formatted it.

new Date("2026-07-31") parses as midnight UTC. Format that on a host set to a negative UTC offset and you get July 30th. The note I wrote today was published yesterday, according to the site, and only according to the site.

The date I wrote is a calendar day, not a point in time. So the parser now matches YYYY-MM-DD explicitly and builds the date from its parts, which the Date constructor treats as local. Anything that does not match that shape returns an invalid date instead of falling back to the UTC parse — falling back would reintroduce the exact bug the function exists to prevent.

A note with a bad date gets skipped and logged rather than throwing, because four pages read this feed and one malformed file should not take all of them down.

Written . Something wrong or out of date? Tell me.