jamesplease / moment-business

Utilities for work days in Moment. (Western workweeks only.)
MIT License
100 stars 27 forks source link

Introduce floating point precision. #55

Open jreeter opened 7 years ago

jreeter commented 7 years ago

Often times when calculating week days I'd like more precision to be returned. Currently calculations less then one day get rounded down to zero. I would like to see a flag introduced to signal when to not round down. So we end up with possible values of 0.5 days or 7.3 days.

jamesplease commented 7 years ago

Hey there @jreeter . I'm not opposed to adding something like this, but someone else would need to code it up with tests and make a PR. If you're up to the challenge I'd be happy to review!

Thanks :v:

eleventhaus commented 1 year ago

Could really use this feature when calculating weekends. As it stands when calculating weekendDays(Friday, Saturday) it rounds down instead of rounding up.