calendar.monthrange()

calendar.monthrange(year, month)[source]

Return weekday (0-6 ~ Mon-Sun) and number of days (28-31) for year, month.