nhìu đoạn code quáKo biết bạn đã chịu tìm kiếm chưa. Chứ PHP ở google bạn search gì hầu hết là có
http://stackoverflow.com/questions/923925/get-start-and-end-days-for-a-given-week-in-php
http://stackoverflow.com/questions/8694839/get-previous-month-date-range
http://php.net/manual/en/function.strtotime.php