$t = 1504145678; print_r( array( date('Y-m-d', $t), date('Y-m-d', strtotime('- 1 month', $t)), date('Y-m-d', strtotime('- 2 month', $t)) ));
$t = 1504145678; print_r( array( date('Y-m-d', $t), date('Y-m-d', strtotime('- 1 month', $t)), date('Y-m-d', strtotime('- 2 month', $t)) ));