in reply to code to get the date for "next Thursday"

Or, yet differently, if you want to score some software design points:
use DateTime; use DateTime::Event::Recurrence; my $thu = DateTime::Event::Recurrence-> weekly(days => 4); # Thursday my $days = DateTime::Event::Recurrence-> daily(); my $set = $thu->intersection($days); my $it = $set->iterator( start => DateTime->today() ); if(my $dt = $it->next()) { print "Next Thursday from today: $dt\n"; }