ActionView::Helpers::DateHelper
distance_of_time_in_words
API docs (Rails 8.1.4.1) ↗def distance_of_time_in_words(from_time, to_time = 0, options = {})
Description
Returns the difference between two times as a string such as "about 2 hours".
ERB
Changes from the previous output: Added Removed Changed
HTML
Preview
Form submission
Form data
| name | value |
|---|
Request body
Content-Type:
params