evanisnor / durationjs

A JavaScript library for parsing and manipulating ISO 8601 formatted duration strings.
MIT License
13 stars 6 forks source link

Change the ago function to correctly add s or not #12

Closed birdwell closed 8 years ago

birdwell commented 8 years ago

There are issues with adding s to the end. We would get this.inMonths() returning 1.3 and that would add 1 months ago as the string. Adding the floor to the compare as well would insure the s isn't incorrectly added.

evanisnor commented 8 years ago

Nice catch! Thanks!