Closed jpuffer closed 6 years ago
I've pushed a version of this plugin to the master
branch where the default behaviour is rounding, not truncating. If you try the updated version, it should do what you want. Hopefully I'll have it published soon.
Closing this. Fixed in 65bde6d59f17dcf15842e032f9ae97da6b0f2bed.
Precision should round to the specified number of digits instead of chopping the last digits off. Chopping the last digits leads to very inaccurate results. For example:
moment.duration(1200,"ms").format("s[s]", 1) -> "1.1s"
moment.duration(1200,"ms").format("s[s]", 5) -> "1.19999s"