Format daty php minus 1 dzień
date('Y-m-d',(strtotime ( '-1 day' , strtotime ( $date) ) ));
Shadow
date('Y-m-d',(strtotime ( '-1 day' , strtotime ( $date) ) ));
$year = new DateTime(date('Y-m-d')); // gets current date
$interval = new DateInterval('P1Y');
$year->sub($interval); // subtract 1 year with $interval
// var_dump($year->format('Y')); or var_dump($year->format('Y-m-d'));