//Once we know what day of the week it falls on, we know how many blank days occure before it. If the first day of the week is a Sunday then it would be zero
switch($day_of_week){
case"Sun":$blank=0; break;
case"Mon":$blank=1; break;
case"Tue":$blank=2; break;
case"Wed":$blank=3; break;
case"Thu":$blank=4; break;
case"Fri":$blank=5; break;
case"Sat":$blank=6; break;
}
// We then determine how many days are in the current month