Compare commits

..

8 Commits

2 changed files with 53 additions and 7 deletions

View File

@@ -319,11 +319,11 @@ def attach_common(conn, resource, items):
def monthly_finance(conn, tenant="科普·无界"):
from datetime import date
today = date.today()
# 12 months: 9 before + current + 2 after
# 6 months: 3 before + current + 2 after
from dateutil.relativedelta import relativedelta
start = today + relativedelta(months=-9)
start = today + relativedelta(months=-3)
months = []
for i in range(12):
for i in range(6):
m = start + relativedelta(months=i)
months.append(m.strftime("%Y-%m"))
data = []

File diff suppressed because one or more lines are too long