- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$rangeEnd = date("Y-m-d 23:59:59", strtotime("16th of last month"));
$rangeStart = date("Y-m-d 00:00:00", strtotime($rangeEnd." -6 days"));
echo $rangeStart." - ".$rangeEnd;
?>