programming-examples/python/Date/Program to get the last day of a specified year and month.py
2019-11-15 12:59:38 +01:00

4 lines
91 B
Python

import calendar
year = 2015
month = 2
print(calendar.monthrange(year, month)[1])