This commit is contained in:
yumoqing 2021-07-21 15:55:35 +08:00
parent 1686c41b5e
commit 9cefb5b53e

View File

@ -161,7 +161,7 @@ def timestamp2dt(t):
return datetime.datetime.fromtimestamp(t) return datetime.datetime.fromtimestamp(t)
def date_weekinyear(date_str): def date_weekinyear(date_str):
w = datetime.datetime.strptime(date, '%Y-%m-%d').strftime('%W') w = datetime.datetime.strptime(date_str, '%Y-%m-%d').strftime('%W')
return date_str[:5] + w return date_str[:5] + w
def date_season(date_str): def date_season(date_str):
@ -183,4 +183,3 @@ def date_season(date_str):
s = sl.get(m) s = sl.get(m)
return date_str[:5] + s return date_str[:5] + s
def date_s