Posts by Cauê Thenório • 181 points
2 posts
-
4
votes3
answers198
viewsA: How to humanize javascript dates
Using Moment.js is a good thing, but calculating the difference in milliseconds to then format the result in years, months and days is not. When you ask Moment to format a millisecond amount for…
-
3
votes1
answer1183
viewsA: Difference between JS Dates - Error momentjs
To calculate the difference between a long time interval, calculate the years, months and days separately. Using milliseconds to calculate a difference of months will hardly bring the expected…