Date Formats and Other Religious Wars
You can usually identify a programmer at a party by asking for their opinion on date formats.
Before long someone is arguing for ISO-8601, someone else is defending locale-specific formats, and another is explaining why Unix timestamps are the purest representation of time. Typical elitist New Yorkers.
They’re all missing the point. Most dates are not for computers. They’re for people.
The purpose of a human-readable date label is simple: reduce cognitive load. A reader should not have to stop and think about when something happened.
This is made worse by date formats. A subset of readers will look at “2026-02-09” and briefly wonder whether that means February 9th or September 2nd. The United States deserves at least partial blame for this, having decided that month-day-year was a reasonable order for anything.

Date formats also depend on context. When is now? A raw date like “July 3rd” is only useful if the reader knows what today is.
This is where human-readable labels help. They add context and reduce the amount of mental arithmetic required from the reader.
But they need to be handled carefully, because a label that lies is worse than no label at all. Context is king, but if you’re going to shoot the king, don’t miss.
The Immediate Past
When something has happened recently, relative time labels are extremely useful.
This only works if you’re willing to keep the labels updated.
Rules are evaluated top to bottom. First match wins.
| Label | Description |
| Now | Where number of seconds elapsed < 60 Alternative label: Moments ago |
| 1 minute | Number of minutes elapsed < 2 |
| X minute(s) | Number of minutes elapsed |
| 1 hour | Number of hours elapsed < 2 |
| X hour(s) | Number of hours elapsed |
On the web, that means using JavaScript to periodically re-evaluate timestamps and update the labels as time passes. If you aren’t prepared to do that, don’t bother.
“5 minutes ago” should always mean five minutes ago. It shouldn’t become three days old because someone left a browser tab open.
The Near Past
At some point the value of relative timestamps starts to diminish.
Ask yourself a simple question: is the human-readable label still helping the reader?
If not, move on to a formatted date.
| Label | Description |
| Today | Number of hours elapsed >= 12, within the current day of the user’s local timezone. |
| Yesterday | Yesterday is between 00:00 and 23:59 on the previous day in their local timezone. It is not “any time between now, and now minus 24 hours“. |
For example, imagine it is 2:15 a.m. and a story was published at 11:10 p.m. the previous evening.
Should the label be “3 hours ago” or “Yesterday”? If you follow the ordering above, “3 hours ago” wins.
That feels correct because the elapsed time is more useful than the calendar boundary. It’s important to understand the use-cases to make informed decision for your users.
The Not So Distant Past
Once we’re talking about days, we should be careful.
The goal is still reducing cognitive load. Beyond a certain point, relative dates stop helping and start forcing the reader to do unnecessary translation.
Personally, I would stop at three days.
| Label | Description |
| 2 days ago | Occurred 2 days ago, between 00:00-23:59 in their local timezone |
| 3 days ago | Occurred 3 days ago, between 00:00-23:59 in their local timezone |
Beyond edge cases, this is the limit of how far you should go with readable timestamps. Use a formatted date and move on with your life. If you feel compelled to show “17 days ago” or “43 days ago”, I wish you luck.
Complexity
The temptation to optimize these systems is enormous. Resist. Your fallback should almost always be a formatted date:
August 27th, 2025
The only optimization I would consider is omitting the year if the date falls within the current calendar year, per the users timezone settings.
Do you really need to do that? Probably not.
A Parting Shot at the Future
Everything above concerns the past, because in media and publishing that’s where I live. The future is where things become dangerous, so consider this a warning rather than a spec.
People will disagree with some of these definitions, and that’s fine. They’re still wrong. If it helps, I’m wrong too.
“Today” and “Yesterday” are generally safe because they correspond to actual calendar boundaries.
In media and publishing I am focused on the present and past. The future is where things become dangerous.
For example, imagine today is Monday. If I say ‘next Friday’ I mean in four days from now, though for some people ‘next Friday’ is eleven days away. Those people are incorrect and not to be trusted with important things.
Rather than trying to accommodate both, or endless arguments, defer to the officially correct definition. Life is short. Date arguments are long.
