Rename or restructure until the code reads. The name holds what the comment would have said, and it cannot go stale.
// grace period is 15 min after publish
if (Date.now() - post.publishedAt < 900_000) {
...
}
const EDIT_GRACE_PERIOD_MS = 15 * 60 * 1000
function isWithinEditGracePeriod(post: Post) {
return Date.now() - post.publishedAt < EDIT_GRACE_PERIOD_MS
}
if (isWithinEditGracePeriod(post)) {
...
}