Skip to content

Commit

Permalink
修复农历纪念日计算错误的Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Thund1R committed Jan 5, 2023
1 parent d1dbf80 commit 8d58b45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions days.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'''
Author: Thund1r [email protected]
Date: 2022-09-22 14:26:19
LastEditTime: 2023-01-01 23:28:42
LastEditTime: 2023-01-05 22:29:34
Description: 日期数据
Copyright (c) 2022 by Thund1r [email protected], All Rights Reserved.
Expand Down Expand Up @@ -33,7 +33,7 @@ def get_remain(target_day, target_name):
lunar_day).to_datetime().date()
this_date = ZhDate(this_year, lunar_mouth,
lunar_day).to_datetime().date()
if today < last_date:
if today <= last_date:
this_date = last_date
else:
solar_month = int(target_day.split("-")[1])
Expand Down

0 comments on commit 8d58b45

Please sign in to comment.