There Are Three Dates
Looking For Time
I'm making a plugin for my text editor to add some automation1. An early feature was the ability to use a hotkey to update the dates for each post.
Where It Started
My notes have a metadata section that includes a created
attribute and an optional updated
attribute. The template I use to make a new post creates them both with the date and time the files was created automatically filled in.
Something like this:
-- metadata
-- created: 2025-05-01T09:48:02-04:00
-- updated: 2025-05-01T09:48:02-04:00
When I finish a post I hit a hotkey that updates them to the current time.
The Draft Situation
The friction I'm feeling comes from publishing my drafts and scratch notes. The created
date is meaningful. It's when I first started working on a thing. If I overwrite that when I post the completed version, I lose it.
I could use the updated
field. That's weird too. The first rounds of changes that take a post from draft to published are edits. Not updates. Updates come from revisions after the first real version is out the door.
Hitting A Triple
Today's realization is that two dates aren't enough. I need three: Created, Completed, and Updated.
That'll let me publish the scratch and draft notes with the initial created
date. I'll add the completed
date when the first full version is complete. The updated
attribute comes in if I go back to rework the piece.
Feed Time
I want to keep track of the dates in general. Even if I didn't, it's still important the plans I have to add feeds to my site. Since I publish my drafts, they need a date to work properly. When I finalize a piece and mark it done it'll go into my main feed.
A post could be several days old by the time I move it from "draft" to finalized.
If it keeps the original "created" date it could easily be days old. It wouldn't resurface in feed readers. But, marking it updated
isn't accurate. Any changes during the draft stage are just edits.
Footnotes
It'll eventually be part of a larger project I'm calling Grimoire Server. It's a local server that I can use in combination with a connected browser extension and the Neovim plugin to do things like save bookmarks, quotes, etc.