Posts by João Kleberson • 1 point
1 post
-
0
votes2
answers48
viewsA: Count difference of months between dates
I resolved it this way: $mes1 = new DateTime('2018-11-21'); $mes2 = new DateTime('2020-02-21'); $diff = $mes1 -> diff($mes2); echo (($diff->format('%y') * 12) + $diff->format('%m')) . "…
phpanswered João Kleberson 1