In Rails, display time between two dates in English

前端 未结 6 546
南方客
南方客 2020-12-07 19:15

In a Rails project I want to find the difference between two dates and then display it in natural language. Something like

>> (date1 - date2).to_natur         


        
6条回答
提交回复
热议问题