import calendar
value='2022-02'
year,month = value.split('-')
_,last_day = calendar.monthrange(int(year),int(month))
min_date = f"{year}-{month}-01"
max_date = f"{year}-{month}-{last_day}"
python根据年月,推算出最后一天
最新推荐文章于 2024-11-03 20:27:08 发布