When I try to use carbon diffInMonths() it gives me values less 1, why is that?
$months = Carbon::parse('2023-11-30')->diffInMonths(Carbon::parse('2023-10-01'), false);
//$months = 1 instead of 2
What am I doing wrong?
I am manually adding 1 after results which is dangerous.
If you want rounded diff:
$months = round(Carbon::parse('2023-11-30')->floatDiffInMonths(Carbon::parse('2023-10-01'), false));