Closed ntanitime closed 8 years ago
It looks like there was a linting error:
humanize-duration.js:362:9: "firstOccupiedUnitIndex" is defined but never used
Could you take a look at this and update this PR?
Done!
It looks like a couple of other tests are failing.
You can try pushing new commits to run these tests but running npm test
is probably best.
Sorry, It's my first pull request! Now my fix should be fine :)
Done!
I've been busy—I'll take a look at this soon.
Finally took a look at this—so sorry it took so long.
The current behavior actually looks correct to me:
humanizeDuration(5219998, {
delimiter: ' and ',
units: ['d', 'h', 'm'],
round: true,
largest: 2
})
// => '1 hour and 27 minutes'
Are you getting different results?
@ntanitime Any thoughts?
In case like this:
The old algorithm give a wrong result: "1 hour". With my fix : "1 hour and 27 minutes"