in reply to How to find first day of the first week on the month?
Take a look at Date::Calc. If you're interested in the day of the week a given date falls on, you probably want the Day_of_Week function; ie.:
$dow = Day_of_Week($year,$month,$day); [download]