Skip to content
On this page
On this page
This component requires JavaScript to function. Please refer to the Installation section to set it up.

Use TimeAgo to display a time relative to how long ago it was. This component requires JavaScript.

Arguments

NameTypeDefaultDescription
timeTimeN/AThe time to be formatted
microBooleanfalseIf true then the text will be formatted in "micro" mode, using as few characters as possible
system_argumentsHashN/ASystem arguments

Examples

Default

Nov 28, 1989
<%= render(Primer::TimeAgoComponent.new(time: Time.at(628232400))) %>