Relative time
Relative time displays time in a way that is clear, concise, and accessible.
On this page
Description
Formats a timestamp as a localized string or as relative text that auto-updates in the user's browser.
Arguments
| Name | Default | Description |
|---|---|---|
datetime | N/A | TimeThe time to be formatted. |
tense |
| SymbolWhich tense to use. One of |
prefix |
| sringWhat to prefix the relative ime display with. |
second |
| SymbolWhat format seconds should take. One of |
minute |
| SymbolWhat format minues should take. One of |
hour |
| SymbolWhat format hours should take. One of |
weekday |
| SymbolWhat format weekdays should take. One of |
day |
| SymbolWhat format days should take. One of |
month |
| SymbolWhat format months should take. One of |
year |
| SymbolWhat format years should take. One of |
time_zone_name |
| SymbolWhat format the time zone should take. One of |
threshold |
| stringThe threshold, in ISO-8601 'durations' format, at which relative time displays become absolute. |
precision |
| SymbolThe precision elapsed time should display. One of |
format |
| SymbolThe format the display should take. One of |
format_style |
| SymbolThe format the display should take. One of |
lang |
| stringThe language to use. |
title |
| stringProvide a custom title to the element. |
system_arguments | N/A | Hash |