Detecting holidays

I haven’t forgotten! I’m trying to get the architecture right (I was
modifying the Date class directly, but now I made a module), but I’m
having some testing problems (for some reason it’s not including the
default Date class first before my extensions…even though I’m
requiring it.

I’m working on it!

–Jeremy

On 1/3/07, Alex Y. [email protected] wrote:

Unfortunately, there doesn’t seem to be much explanation of the logic
behind them.


Alex


My free Ruby e-book:
http://www.humblelittlerubybook.com/book/

My blogs:

http://www.rubyinpractice.com/

Jeremy McAnally wrote:

I haven’t forgotten! I’m trying to get the architecture right (I was
modifying the Date class directly, but now I made a module), but I’m
having some testing problems (for some reason it’s not including the
default Date class first before my extensions…even though I’m
requiring it.

I’m working on it!

I tinkered a bit with the notion of using a module instead of monkey
patching the Date class (or subclassing) but I wasn’t satisfied with
the interface. I’ll be curious to see what you come up with.

Regards,

Dan

Jeremy McAnally wrote:

Okay, I got the code done. I just need to create lists of holidays
now. I can do the U.S. holidays (if I need any help algorithm-wise,
I’ll let you guys know…), but I have no clue about UK or anyone
else’s holidays. Anyone from another locality care to englighten me?
http://www.dti.gov.uk/employment/bank-public-holidays/index.html

This may also be of use:

Unfortunately, there doesn’t seem to be much explanation of the logic
behind them.