import datetime import calendar delta = datetime.datetime.today() _, month_day = calendar.monthrange(delta.year, delta.month)
The number of days in today's month is assigned to month_day.
Recommended Posts