python 获得本月的天数

import calendar
import datetime
today = datetime.datetime.today()
monthRange = calendar.monthrange(today.year,today.month)[1]
print(monthRange)

猜你喜欢

转载自blog.csdn.net/qq_15256443/article/details/89465691