Recurrences with Set Math
- Take some time off:
my $recur =
DateTime::Event::Recurrence->weekly( days => [ 1 .. 5 ] );
my $days_off =
DateTime::Set->from_datetimes
( dates => [ map { DateTime->new(%$_) }
{ year => 2006, month => 7, day => 12 },
{ year => 2006, month => 7, day => 13 } ] );
$recur = $recur->complement($days_off);
- run the script - days-off