EvanHahn / HumanizeDuration.js

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

Use a format specifier. #8

Closed irfn closed 10 years ago

irfn commented 10 years ago

Specific use case required me to change the default format duration.

Use case: Usage quota for a Saas service is measured in hours and minutes.

Note that i am using 240 hours instead of 10 days. Essentially some cases may required to omit some "units"

I have implemented this here.

https://github.com/irfn/HumanizeDuration.js/commit/846b0248391c56f59efcb5b70f270551ec8299c5

Currently have used a 3rd argument to specify the format like "H,M,S"

EvanHahn commented 10 years ago

Let's discuss this at the pull request, not here.