Epoch seconds, ms, µs and ns to dates in any time zone and back
Relative Time Formatter
See how a date reads as relative time in many languages, and get the matching Intl.RelativeTimeFormat code.
Loading tool…
How to use relative time formatter
Pick the date and time to describe.
Compare it with now (updates live) or with another date.
Choose a language, a style and whether to use words like 'yesterday'.
Copy the phrase or the JavaScript that produces it.
What this tool does
- Picks a natural unit: seconds, minutes, hours, days, weeks, months or years.
- Days and longer are counted on the calendar, so last night reads as 'yesterday'.
- Fifteen languages side by side, in long, short or narrow style.
- The same gap expressed in every unit.
How the result is verified
Every phrase is produced by the browser's built-in Intl.RelativeTimeFormat, and the code panel shows the exact call, so you can paste it into a console and get the same text.
Frequently asked questions
What does numeric auto do?
With auto, Intl uses words where a language has them: 'yesterday' instead of '1 day ago' and 'next week' instead of 'in 1 week'. With always, it is always a number.
How is the unit chosen?
Under a minute uses seconds, under an hour minutes, under a day hours. Then calendar days up to 6, weeks until a full month has passed, months up to 11, and years after that.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
Date and time in every ISO 8601 form, plus durations
Years, months, days, weeks and weekdays between two dates
One time in many zones, with daylight saving and day changes shown