jamesplease / moment-business

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

Add holidays #46

Open leobetosouza opened 8 years ago

leobetosouza commented 8 years ago

I know that holidays varies by country, state, city, province, etc

I think would be good have a way to set the holidays, with a array of month/date

For instance with the US federal holidays would be something like this moment.setHolidays(['January 01', 'January 18', 'February 15', 'July 04', 'May 30', 'September 5', 'October 10', 'November 11', 'November 26', 'December 26'])

For NY we would push some more days to the list: moment.addHolidays(['February 12', 'November 08', 'December 25'])

Them when we use methods of moment-bussiness it consider these days not as weekdays, and not as weekendDays.

We can also create methods to count holidays.

What do you think?

jamesplease commented 8 years ago

Makes sense to me. If you've got time to open a PR, I would review/merge it :v: But I won't have time to add the feature myself

jakeleboeuf commented 6 years ago

@jmeas anybody ever take a stab at a PR for this?

jamesplease commented 6 years ago

Not yet 🙂

gndelia commented 5 years ago

Is this alive ? If I created a PR, would there any time to review it?