jsmreese / moment-duration-format

Format function plugin for the Moment Duration object.
MIT License
967 stars 121 forks source link

Decimals appears when formatting years #151

Open cmoine opened 3 years ago

cmoine commented 3 years ago

moment.duration(moment(moment([2021, 4, 30]).diff(moment([2004, 9, 1])), 'seconds').format('yy [years]') shows for instance: 16.579 years, 9 months, 16 days

There shouldn't be decimals for years, or am I missing something?