Added endpoints for #1006 and #1007

This commit is contained in:
Anastasia Gradova
2024-05-25 20:59:08 -06:00
parent 5cd68e8081
commit 5fbad5bd69
4 changed files with 137 additions and 11 deletions

View File

@@ -1,3 +1,4 @@
import calendar
from datetime import date, datetime, time, timedelta
@@ -64,3 +65,7 @@ def get_calendar_year_for_datetime(start_date):
return year - 1
else:
return year
def get_number_of_days_for_month(year, month):
return calendar.monthrange(year, month)[1]