docs: days diff + new days_diff util function

This commit is contained in:
Hussain Nagaria 2023-12-16 22:48:25 +05:30
parent 40b8956652
commit d1131db2a7

View file

@ -291,6 +291,12 @@ def add_years(date: DateTimeLikeObject, years: NumericType) -> DateTimeLikeObjec
def date_diff(string_ed_date, string_st_date):
"""Returns the difference between given two dates in days."""
return days_diff(string_ed_date, string_st_date)
def days_diff(string_ed_date, string_st_date):
"""Returns the difference between given two dates in days."""
return (getdate(string_ed_date) - getdate(string_st_date)).days