ActionView::Helpers::DateHelper
time_ago_in_words
API docs (Rails 8.1.4.1) ↗Alias: distance_of_time_in_words_to_now
def time_ago_in_words(from_time, options = {})
Description
Returns the difference from the current time as a string such as "3 days".
ERB
Changes from the previous output: Added Removed Changed
HTML
Preview
Form submission
Form data
| name | value |
|---|
Request body
Content-Type:
params