in reply to Re^2: Calculating holidays
in thread Calculating holidays

Yes, that's a good point, the loop isn't very elegant. Personally I still like to anchor things at the beginning or end of the month, so I might write:

my $dt = DateTime->new(year=>$year, month=>11); $dt->add( days=>(4-$dt->dow())%7, weeks=>3 );

(But that's just getting nitpicky ;-) )