From c11b147d1d034a5559576c83f5eced768b2b2b77 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 28 Dec 2018 15:23:00 -0500 Subject: [PATCH] org-parse-time-string: Describe time stamp matching behavior * 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 a057ae5ac..0653f6ae3 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -1112,7 +1112,9 @@ nil, just return 0." 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)