AZ Tools

Relative Time Formatter

Time

A live preview of the browser's built-in `Intl.RelativeTimeFormat`. Pick a target date and a base (default: now, updating every second), and see the formatted relative string in your chosen locale. Choose `auto` numeric to get phrasings like `yesterday` and `last week` where the language supports it, or `always` to force `1 day ago` / `1 week ago`. The unit table shows the same difference rendered as each unit — useful when picking which granularity reads best for your UI.

How to use

  1. Pick a target date. Leave the base on `now` for a live ticker, or uncheck to compare two fixed dates.
  2. Switch locale to see how Spanish, Korean, Arabic etc. render the same difference. The shape of the phrase often changes (RTL, particles, gendered nouns).
  3. Use the unit table to compare granularities side-by-side and pick the one that reads best in your interface.

Frequently asked questions

What's the difference between `numeric: auto` and `always`?
`auto` returns idiomatic phrasings when available — `yesterday` instead of `1 day ago`, `last week` instead of `1 week ago`. `always` forces the number, which is what you usually want for a literal duration display. UIs that want chat-style timestamps usually want `auto`.
Why does the same diff give different units?
The main output picks the largest unit where the absolute value ≥ 1 of that unit — so 90 minutes shows as `1 hour ago` even though you could also say `90 minutes ago`. The unit table lets you see every option.

Related tools