Closed jvorcak closed 5 years ago
To quote the readme, HumanizeDuration.js "is actively maintained but no new features will be added." This sounds like a new feature, unfortunately.
I realize it's not as powerful as the maxDecimalPoints
feature you added in #140, but would the round
option solve this problem?
Not really. Using round
is not powerful enough, we're specifically interested in 2 numbers after ,
.
I think that if a library outputs 8s 255.28000000000065ms
for 8255.28
input, it can be considered a bug. Can you please re-consider adding this?
Good point—it's arguably a bug.
I'll think about this and get back to you.
For future reference, let's discuss this in the PR at #140.
If I create a custom language and pass a number
8255.28
, it outputs8s 255.28000000000065ms
which is not wanted.It happens because of this line https://github.com/EvanHahn/HumanizeDuration.js/blob/master/humanize-duration.js#L493