feat: Add get_first_day_of_week utillity method

This commit is contained in:
Suraj Shetty 2019-06-11 21:25:32 +05:30
parent b0741a9b26
commit 2b85f4996c

View file

@ -182,6 +182,9 @@ def get_first_day(dt, d_years=0, d_months=0):
return datetime.date(year, month + 1, 1)
def get_first_day_of_week(dt):
return dt - datetime.timedelta(days=dt.weekday())
def get_last_day(dt):
"""
Returns last day of the month using: