diff --git a/frappe/utils/data.py b/frappe/utils/data.py index 0df5a32ef5..f3100cbbf5 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -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