起始月份结束月份计算范围

 

 

1
2
3
4
5
6
7
8
9
10
moon_list_title = []
          moonlist = []
          for item in range(int(split_start[1]), int(split_end[1]) + 1):
              day_num = calendar.monthrange(int(split_end[0]), int(item))
              moon_list_title.append(str(split_start[0]) + "-" + str(item) + "月")
              year = "0" + str(item) if len(str(item)) < 2 else str(item)
              moonlist.append(
                  (str(split_start[0]) + "-" + str(year) + "-" + "01 00:00:00",
                   str(split_start[0]) + "-" + str(year) + "-" + str(day_num[1]) + " 23:59:59")
              )

  

posted @   WrYcF  阅读(76)  评论(0编辑  收藏  举报
Live2D
欢迎阅读『起始月份结束月份计算范围』
点击右上角即可分享
微信分享提示