This commit is contained in:
DingZQ
2025-04-07 22:14:00 +08:00
parent e07bbb70f3
commit 603cb1f2aa
2 changed files with 8 additions and 2 deletions

View File

@@ -134,4 +134,10 @@ def is_tomorrow(query_date: str) -> bool:
dt = parse_beijing_time(query_date)
return dt.date() == (datetime.now().date() + timedelta(days=1))
def is_today_or_future(query_date: str) -> bool:
'''
判断一个日期是否是今天或未来
'''
dt = parse_beijing_time(query_date)
return dt.date() >= datetime.now().date()