Skip to content
hateitall

Relative Time Formatter

See how a date reads as relative time in many languages, and get the matching Intl.RelativeTimeFormat code.

Processed locallyIn: Date, TimeOut: Text, Code

Loading tool…

How to use relative time formatter

  1. Pick the date and time to describe.

  2. Compare it with now (updates live) or with another date.

  3. Choose a language, a style and whether to use words like 'yesterday'.

  4. 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.

Epoch seconds, ms, µs and ns to dates in any time zone and back

Unix timestamp · ISO 8601 · Date→ Unix timeLight on device

Date and time in every ISO 8601 form, plus durations

Date · Time · Time zone +→ ISO 8601Light on device

One time in many zones, with daylight saving and day changes shown

Date · Time · Time zone→ DateLight on device