First day of each month
问题 If I start with the current date, how can I get the first Friday of each month? I was thinking about using $date->get(Zend::WEEKDAY) and comparing that to Friday and then with DAY and checking if it is less than or equal to 7. Then adding 1 month onto it. There must be something simpler? 回答1: How about $firstFridayOfOcober = strtotime('first friday of october'); Or turn it into a handy function:- /** * Returns a timestamp for the first friday of the given month * @param string $month *