Relative Time Formatter

Turn any past or future date into a phrase like “3 days ago”, “in 2 weeks”, “yesterday”, or “just now”. Four styles — long, short, spelled, and approximate — plus a live now reference, one-click copy, and a bulk mode that formats one date per line. Accepts ISO 8601, RFC 2822, Unix epoch (s / ms / us / ns with auto-detect), and bare years like 2024. Pure client-side, no upload.

now: —

ISO 8601: 2024-03-15 or 2024-03-15T14:00:00Z. Unix epoch: 1710441000 (seconds), 1710441000000 (ms), or with suffix 1710441000s / 1710441000000ms. RFC 2822: Fri, 15 Mar 2024 14:00 GMT.

Style
Options

Phrasings

Long

Short

Spelled

Approximate

Each line is parsed independently; the output is TSV with columns input | iso | delta_seconds | long | short | spelled | approximate. Bad lines are flagged with [parse error] in the first column.

How relative time phrases are built
  • Bucketing rounds the signed second count to the nearest natural unit: seconds < 1 min, minutes < 1 h, hours < 1 day, days < 2 weeks, weeks < 1 month, months < 1 year, then years up to 8 y before falling back to months.
  • Calendar override: a date whose UTC calendar day is exactly the same as now reads as today; one day before as yesterday; one day after as tomorrow. Sub-30-second deltas always read as just now. Turn the override off with the checkbox above.
  • Spelled spells the count out in English (“twenty-one days ago”) using the same bucket, useful for accessibility and for prose that needs to be read aloud.
  • Approximate uses fuzzy words (“a few minutes ago”, “a year ago”) — handy for humanised UI copy where the exact count is irrelevant.
  • Parsing auto-detects epoch units by length (10 / 13 / 16 / 19 digits → s / ms / us / ns), or by explicit suffix. Bare 4-digit years map to January 1 UTC of that year.
  • Nothing leaves the browser. The whole tool runs in this tab, the input never gets uploaded, and the result is reproducible with a fixed now.