Let’s say I want to find out the difference in seconds between two times. One of the times is the created_at attribute of the element, and the other time is a random fixed time in the past. How would I find the difference between the two, and transform it into seconds?
Let’s say I want to find out the difference in seconds between two times.
Share
Lucky for you the
-operator in ruby returns you an float which is the difference in seconds.