ActionView::Helpers::DateHelper
relative_time_in_words
API docs (Rails 8.1.4.1) ↗def relative_time_in_words(from_time, options = {})
Description
Converts the difference from the current time to the same string as distance_of_time_in_words, and returns it inserted into %{time} of the datetime.relative.past translation (in the past) or datetime.relative.future (in the future).
ERB
Changes from the previous output: Added Removed Changed
HTML
Preview
Form submission
Form data
| name | value |
|---|
Request body
Content-Type:
params