Commit 9dfa0fa1 authored by 吕先亚's avatar 吕先亚

refactor(vender): 移除最后交易日排除周末的逻辑- 删除了用于判断和跳过周末的 while 循环

- 保留原始逻辑,即返回当月最后一天的时间戳
parent d4bbf72d
......@@ -12,8 +12,6 @@ def last_busi_date(day_str: str):
_, last_day = calendar.monthrange(year, month)
last_day_date = datetime(year, month, last_day)
last_day_date = last_day_date.replace(hour=23, minute=59, second=59, microsecond=997000)
while last_day_date.weekday() >= 5: # weekday() 返回0-6,5是周六,6是周日
last_day_date -= timedelta(days=1)
return last_day_date.strftime('%Y-%m-%d %H:%M:%S.%f')[:-3]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment