Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could use a better string interpolation tool that replaces, “0 days ago” with “today”.


ActiveSupport still has a wonderfully readable implementation:

https://github.com/rails/rails/blob/b0c813bc7b61c71dd21ee3a6...

Though I don't really use Rails that often any more, I still miss some of the niceties.


If something was less than 24 hours ago, there's a good chance that it was actually be "yesterday" rather than "today".

The peer post linking to someone else's solution that uses size appropriate scales seems better.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: