I try diff in month at 2 dates. var_dump show me 0. But February have 28 days. 28, 29, 30, 31 January + 28 days February more 1 months. Why diff == 0?
$d1 = new Carbon('2023-01-29'); $d2 = new Carbon('2023-02-28'); var_dump($d1->diffInMonths($d2));
Diff in months with Carbon
50 views Asked by user3212439 At
1
Try this: