D
Daniel Berger
Hi all,
Well, it took seven years, but I've finally been annoyed enough by
reports failing on national holidays to say something. Report writers
know the routine:
Them: Why did the report fail for Jan. 1st?
Me: National holiday. There was no data to grab. Ignore the failure.
Them: Oh, right.
Repeat again for Memorial Day, July 4th, Thanksgiving, and Christmas.
Is there a package out there that deals with national holidays (for any
nation)? The only thing I came across what date2, but that only seems
to handle Japanese national holidays. I guess I'm looking for
something like Perl's Date::Calc [1] module or, more specifically, it's
Date::Calendar:rofiles [2] module. Or something like Perl's
Date::Holidays::XXX [3] approach (I'm not sure which is preferred these
days).
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
And no, it's not a simple matter of using something more flexible than
cron because some reports pull data from X days back or ahead, not on
the date they're run.
Thoughts?
- Dan
[1] http://search.cpan.org/~stbey/Date-Calc-5.4/Calendar.pod
[2]
http://search.cpan.org/~stbey/Date-Calc-5.4/lib/Date/Calendar/Profiles.pod
[3]
http://search.cpan.org/~jonasbn/Date-Holidays-0.08/lib/Date/Holidays.pm
Well, it took seven years, but I've finally been annoyed enough by
reports failing on national holidays to say something. Report writers
know the routine:
Them: Why did the report fail for Jan. 1st?
Me: National holiday. There was no data to grab. Ignore the failure.
Them: Oh, right.
Repeat again for Memorial Day, July 4th, Thanksgiving, and Christmas.
Is there a package out there that deals with national holidays (for any
nation)? The only thing I came across what date2, but that only seems
to handle Japanese national holidays. I guess I'm looking for
something like Perl's Date::Calc [1] module or, more specifically, it's
Date::Calendar:rofiles [2] module. Or something like Perl's
Date::Holidays::XXX [3] approach (I'm not sure which is preferred these
days).
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
And no, it's not a simple matter of using something more flexible than
cron because some reports pull data from X days back or ahead, not on
the date they're run.
Thoughts?
- Dan
[1] http://search.cpan.org/~stbey/Date-Calc-5.4/Calendar.pod
[2]
http://search.cpan.org/~stbey/Date-Calc-5.4/lib/Date/Calendar/Profiles.pod
[3]
http://search.cpan.org/~jonasbn/Date-Holidays-0.08/lib/Date/Holidays.pm