This is the script you will need to get the start and end date of last quarter
$start_date = (new DateTime(‘first day of -‘ . (((date(‘n’) – 1) % 3) + 3) . ‘ month’))->format(‘Y-m-d’); # first day of previous quarter
$end_date = (new DateTime(‘last day of -‘ . (((date(‘n’) – 1) % 3) + 1) . ‘ month’))->format(‘Y-m-d’); # last day of previous quarter