From d16683a699da1b0969d781b8dff7b1e3592d833f Mon Sep 17 00:00:00 2001 From: Hussain Nagaria Date: Sat, 16 Dec 2023 22:21:44 +0530 Subject: [PATCH] docs: is_invalid_data_string --- frappe/utils/data.py | 1 + 1 file changed, 1 insertion(+) diff --git a/frappe/utils/data.py b/frappe/utils/data.py index 58a161b8e6..37f28500a4 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -71,6 +71,7 @@ def get_start_of_week_index() -> int: def is_invalid_date_string(date_string: str) -> bool: + """Returns True if the date string is invalid or None or empty.""" # dateutil parser does not agree with dates like "0001-01-01" or "0000-00-00" return not isinstance(date_string, str) or ( (not date_string) or (date_string or "").startswith(("0001-01-01", "0000-00-00"))