$start_date = "2013-05-01";
$last_date = "2013-08-30";
How can I get dates of tuesdays and thursdays between these two dates?
format("N") == 2 || $dt->format("N") == 4) {
echo $dt->format("l Y-m-d") . "
\n";
}
}
See it in action
What this code does:
DateTime::format() with the N parameter to get the day number of the week. If the day number of the week is 2 (Tuesday) or 4 (Thursday) echo out it's value.