Is there a rails helper opposite of time_ago_in_words ? I can't seem to find the opposite...where I can have 7 days from now converted to "in about 1 week".
I can get this to work for the past:
<%= time_ago_in_words( milestone.due_date) %>
But this doesn't work for the future:
<%= time_ahead_in_words(milestone.due_date) %>
stumped.
You can use distance_of_time_in_words(from_time, to_time = 0, options = {})
instead.
So you could set it up like so:
<%= distance_of_time_in_words(Time.now, milestone.due_date) %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With