Answer the question
In order to leave comments, you need to log in
How to find out how many hours are left?
Time.now => 2018-05-10 13:57:58 +0300
// Current date
"2018-05-10T19:24:31+0300" // Find how many hours are left from this date
Answer the question
In order to leave comments, you need to log in
gem time_difference
TimeDifference.between(Time.parse('2018-05-10T19:24:31+0300'), Time.now).in_hours
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question