Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Natural language dates in ruby/rails?

I need to show natural dates like

  1. "few seconds ago"
  2. "21 minutes ago"

Is there something built in to the rails? Or may be third party? This is not hard to implement, but I do not want to invent the wheel.

like image 459
Mike Chaliy Avatar asked Jun 01 '26 13:06

Mike Chaliy


1 Answers

I think what you are looking for is time_ago_in_words

like image 192
Matt Briggs Avatar answered Jun 03 '26 03:06

Matt Briggs



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!