Posts by Constantinologia • 13 points
1 post
-
1
votes1
answer2231
viewsQ: How to subtract two dates using Ruby and the Time library?
That is the code: require 'time' t = Time.parse('2016-04-18') #data de ontém t2 = Time.now #data atual t3 = t2 - t # subtração das duas variáveis(datas) acima puts Time.at(t3) #resultado da…