I need to get only the month of a date that comes with a $request
. But I do not know how to do it:
if ($request->parcelas > 1) {
$mes = $request->data_vencimento = date('m');
for($i = 0; $i <= $request->parcelas; $i++) {
if($request->data_vencimento = date('m') == 12 ){
$mes = 1;
}
var_dump($request->data_vencimento = date('Y-'. $mes . '-d'));
$mes ++;
}
}
The date comes in dd/mm/yyyy
format
That way it picks up the current date. Can anyone help me?