Source Code:
(back to article)
import calendar from datetime import datetime # Get the current year and month now = datetime.now() year = now.year month = now.month # Get the last day of the month _, last_day = calendar.monthrange(year, month) print(last_day)
Result:
Report an issue