My newest Alpine.js plugin alpine-timeago lets you display the human-readable distance between a date and now (like "3 months ago", "about 2 hours ago" or "in 4 hours").
The output gets updated every 30 seconds, so it is always up-to-date.
After installing the package you can simply add the x-timeago
directive to any HTML element, provide the desired date inside the directive and the content of that element gets populated with the human-readable distance.
<span x-data="{ date: new Date() }" x-timeago="date">
<!-- will be something like "about 3 hours ago" for example -->
</span>
You can read the full documentation on GitHub.