Turns out "how long ago was this" is not the simple thing I thought it'd be. First problem: new posts weren't showing up on the homepage. Turns out Next.js caches page data, so it was just serving an old snapshot. Fixed with a revalidate, refetches every 60 seconds now. Then I wanted proper relative dates. Today, yesterday, X days ago, X weeks, X months. Sounds simple. Wasn't. First version compared exact timestamps, so a post from last night showed as "Today" until a full 24 hours had actually passed, which is technically correct and also not how anyone actually thinks about "yesterday." Had to strip the time out and compare calendar days instead. Then the logic itself got messy fast, trying to handle every case in one big tangled condition. Slowed down, built it tier by tier, today, yesterday, days, weeks, months, then a fallback to the actual date. Pulled it into its own file once it got big enough to deserve one. Also wrote dateText = \$(if(diffInDays === 1)) {day} else {days} ago`` at one point, which is not real syntax in any language. Made me laugh though.