修改为count_workday

This commit is contained in:
caoqianming 2022-02-14 10:12:00 +08:00
parent 1ae6e22b00
commit 264da03d4e
1 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ class AtWorkCountView(CreateAPIView):
from workalendar.asia import China
cal = China()
workday_count = cal.get_working_days_delta(
count_workday = cal.get_working_days_delta(
date(vdata['year'], vdata['month'], 1),
(date(vdata['year'], vdata['month'], 1).replace(day=1)
+ timedelta(days=32)).replace(day=1) - timedelta(days=1)
@ -100,5 +100,5 @@ class AtWorkCountView(CreateAPIView):
)
ret_list = list(ret)
for i in ret:
i['workday_count'] = workday_count
i['count_workday'] = count_workday
return Response(ret_list)