From: Kieran Tully Date: 2007-01-03T02:09:39+09:00 Subject: Re: Detecting holidays On 1/2/07, Daniel Berger wrote: > Them: Why did the report fail for Jan. 1st? > Me: National holiday. There was no data to grab. Ignore the failure. > Them: Oh, right. [snip] > Ideally, I'd like to be able to do something like: > > if Date.today.is_national_holiday? > exit # Don't run report on this day > end Nice, but won't this just change the problem to: Them: Why is there no report for Jan. 1st? What currently happens when the report 'fails'? Could you generate an empty report that says 'No data available for today. Was it a holiday?' That might solve your actual problem, without introducing a 'holidays' module. Though if your reports often fail for other reasons, perhaps you do need to detect holidays to distinguish them rom real error conditions. -- Kieran Tully, Software Developer and Tenor, http://ktully.net