<nve-format-relative-time>
Properties
When present, auto-updates the displayed relative time at appropriate intervals.
true
false
Time unit: 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year' | 'auto'. Use 'auto' to let the component select the most appropriate unit based on the time difference.
second
minute
hour
day
week
month
year
auto
Formatting length: 'long' | 'short' | 'narrow'. Controls verbosity (such as '3 days ago' vs '3d ago'). Maps to Intl.RelativeTimeFormat style option.
long
short
narrow
Numeric formatting: 'always' | 'auto'. When 'auto', enables natural language forms such as 'yesterday' instead of '1 day ago'.
always
auto
Language tag (such as en-US, de-DE). Defaults to document.documentElement.lang or browser default.
string
default
Optional date string for values supplied by JavaScript or bound data. By default, the component formats the element's text content, which also serves as the SSR fallback. When both are present, this property takes precedence.
string
default
Slots
Date string to format (such as 2023-07-28T04:20:17.434Z). Serves as fallback before hydration.