* lisp/org-macs.el (org-parse-time-string): Document matching of YYYY-MM-DD substring.
org-clock-special-range used to pass in <-50001-11-30 Tue 00:00> with the expectation that the year would be parsed as -50001, not 0001. Mention this YYYY-MM-DD format assumption in the docstring to help avoid such cases. --- lisp/org-macs.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 6da69c75d..9a65360ff 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -1112,7 +1112,9 @@ (defun org-parse-time-string (s &optional nodefault) If time is not given, defaults to 0:00. However, with optional NODEFAULT, hour and minute fields are nil if not given. -Throw an error if S in not a valid Org time string. +Throw an error if S does not contain a valid Org time string. +Note that the first match for YYYY-MM-DD will be used (e.g., +\"-52000-02-03\" will be taken as \"2000-02-03\"). This should be a lot faster than the `parse-time-string'." (unless (string-match org-ts-regexp0 s) -- 2.20.0