Nice one, Brad! I keep forgetting about that damn built in DateTime class lol
Granted, one suggestion (for the sake of making it all comply with strict standards):
// CONFIG
date_default_timezone_set('America/Montreal'); // change this to the appropriate time zone... - or- use the date.timezone setting or TZ environment variable.
$day = 'Mon';
$today = date('Y-m-d');
$date_to_run = '2009-12-31';
$dates = array();
// END CONFIG
Otherwise, you get unsafe warnings via error_reporting(E_ALL | E_STRICT).