📜  python获取当月有多少天 - Python代码示例

📅  最后修改于: 2022-03-11 14:46:00.538000             🧑  作者: Mango

代码示例1
import calendar
import datetime
now = datetime.datetime.now()
print calendar.monthrange(now.year, now.month)[1]
29