Relative time
"3 days ago" instead of a full date, for posts, comments and updates. In the page's own language, with the exact date when you hover, and it keeps itself current while the page is open.
Relative time
A <time> with a datetime and data-momo-ago. Write a normal date inside: that is what shows without JavaScript.
- Momo 1.0 came out
- Last comment
- Edited
- Joined
- Sale ends
- Short:
<ul class="stack gap-2 m-0 ps-5">
<li>Momo 1.0 came out <time datetime="2026-11-30T09:00:00Z" data-momo-ago>Nov 30, 2026</time></li>
<li>Last comment <time datetime="2026-11-29T18:30:00Z" data-momo-ago>Nov 29, 2026</time></li>
<li>Edited <time datetime="2026-11-23T12:00:00Z" data-momo-ago>Nov 23, 2026</time></li>
<li>Joined <time datetime="2026-03-02T12:00:00Z" data-momo-ago>Mar 2, 2026</time></li>
<li>Sale ends <time datetime="2027-01-15T09:00:00Z" data-momo-ago>Jan 15, 2027</time></li>
<li>Short: <time datetime="2026-11-30T09:00:00Z" data-momo-ago="short">Nov 30, 2026</time></li>
</ul>Posted <time datetime="2026-11-28T10:00" data-momo-ago>Nov 28, 2026</time>
Short
data-momo-ago="short" uses shorter words where the language has them, like "3 hr. ago" or "2 mo. ago", for tight spaces (the last line above).
Notes
- The language comes from
<html lang>:lang="fr"shows "il y a 3 jours". - The exact date and time are in the
title(shown on hover); thedatetimeattribute keeps the real moment for search engines and screen readers. - Times update every 30 seconds while the page is open.