switch ($n){
case "Mon": return "Monday";break;
case "Tue": return "Tuesday";break;
case "Wed": return "Wednesday";break;
case "Thu": return "Thursday";break;
case "Fri": return "Friday";break;
case "Sat": return "Saturday";break;
case "Sun": return "Sunday";break;
};
I only needed it to work for this century, so I replaced a few variables with constants, and I split up the equation itself into its component parts because I'm something of a n00b and I get condused easily.
$y needs to be two digits, not four, eg, "02", "13", vs 2002, 2013, &c.