2 ms·
On the other hand there is no obviously right way, and you really need context to decide on the right way to display a duration of 20 days. This way you can wri
by wongarsu 8y ago
On the other hand there is no obviously right way, and you really need context to decide on the right way to display a duration of 20 days. This way you can write a fairly small wrapper that makes the interesting decisions and leaves the grunt work to the API
- jypepin 8y agoIn a lot of cases, you don't really. Most cases it is pretty easy to guess what you'd want to show. I'd the say the case where you really want to choose IS the hedge case. Moment.js does it, and I never felt like it wasn't what I wanted: https://momentjs.com/docs/#/displaying/fromnow/ https://momentjs.com/docs/#/displaying/fromnow/