Date difference in months
Calculates the month difference between two dates.
- Subtract
start
fromend
and usedatetime.timedelta.days
to get the day difference. - Divide by
30
and usemath.ceil()
to get the difference in months (rounded up).
Calculates the month difference between two dates.
start
from end
and use datetime.timedelta.days
to get the day difference.30
and use math.ceil()
to get the difference in months (rounded up).