Jump to content
Larry Ullman's Book Forums

Date Object And Holidays


Recommended Posts

Is there any easy way to use the Date object in JS to check whether a specific date is a holiday or not?

Of course, I know that the holidays differ by country and region, so it's probably a bit much to ask, but I'm trying to avoid having to write a bunch of algorithms for calculating all the holidays for a given country depending on the year.

 

Any advice would be much appreciated. Thank you.

Link to comment
Share on other sites

Yeah, I actually saw that too, and it's a possibility.

Without going into too much detail though, I'm not interested in American holidays, and I know that there are holidays that change from year to year, so I'll have to either compute them, or just store them in a DB for years in advance, which might just be the best thing to do.

 

Thanks a lot.

Link to comment
Share on other sites

My first inclination would be to find a service that would provide that information for you that you could hook into. But you're not asking for information that changes frequently or is that large, so it'd just be easier and more efficient to create it on your own system. My thoughts anyway...

Link to comment
Share on other sites

 Share

×
×
  • Create New...