EvanHahn / HumanizeDuration.js

361000 becomes "6 minutes, 1 second"
https://evanhahn.github.io/HumanizeDuration.js/
The Unlicense
1.64k stars 175 forks source link

Introduces maxDecimalPoints option fixes #139 #140

Closed jvorcak closed 5 years ago

EvanHahn commented 6 years ago

Thanks—I'll discuss this with you in #139.

jvorcak commented 6 years ago

@EvanHahn you're of course right, I'll add tests asap, I just wanted to have it confirmed that it can be added.

Regarding the other problem, that is a good catch thank you :) I propose to keep maxDecimalPoints name and change the implementation.

parseFloat((ms / unitMS).toFixed(options.maxDecimalPoints))
EvanHahn commented 6 years ago

That sounds good to me!

Lemme know if you want me to double-check any of your test cases before you start on the implementation.

jvorcak commented 6 years ago

@EvanHahn I've added some tests and changed an implementation a bit.

EvanHahn commented 6 years ago

@jvorcak Any updates here?

jvorcak commented 6 years ago

@EvanHahn sorry, but I'm just currently very busy these days. I have it on my TODO list, I'll get back to this asap (hopefully during this/next week)

EvanHahn commented 6 years ago

No worries! Thanks for the update.

EvanHahn commented 6 years ago

Any updates here? No worries if not, just checking in.

EvanHahn commented 5 years ago

@jvorcak Any updates? No rush.

jvorcak commented 5 years ago

@EvanHahn totally forgot about this. This week I have some more time, so I'll have a look hopefully til 20th.

jvorcak commented 5 years ago

@EvanHahn sorry for a delay. Hopefully, it's fine now.

EvanHahn commented 5 years ago

Thanks--I will take a look at this soon.

jvorcak commented 5 years ago

@EvanHahn thanks, and thanks for a review!

EvanHahn commented 5 years ago

This has been deployed in humanize-duration@3.18.0. Thanks for your contribution!