Well, I'm guessing you have some way of generating years, months and days here, so...
date('w',mktime(0,0,0,$month,$day,$year)) will tell you what day of the week $year/$month/$day is; 0 for Sunday through to 6 for Saturday. Obviously, you only want to list those dates for which the above expression returns 0!