//the Saturday of this week $lastday=date("Y-m-d",strtotime("2013-08-28 Saturday")); echo $lastday;
//the first day of this week $endlastday=date("Y-m-d",strtotime("2013-09-27 Saturday")); $endfirstday=date("Y-m-d",strtotime("{$endlastday} -6 days")); echo $endfirstday; //the last day of this month $date = "2013-08-23"; $end_date = date('Y-m-d', mktime(23, 59, 59, date('m', strtotime($date))+1, 00)); echo $end_date;
//the first day of this month $firstDayOfThisMonth = date('Y-m-01',mktime(0,0,0,date('m',strtotime($date))+1,00));