summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2018-12-28 15:23:00 -0500
committerKyle Meyer <kyle@kyleam.com>2019-01-13 12:43:03 -0500
commitc11b147d1d034a5559576c83f5eced768b2b2b77 (patch)
treebc54754c7c0e17b65dee740678dc595caedd0a04
parent9ceb723602e8db9071c88fe1a7bdb070607615db (diff)
downloadorg-mode-c11b147d1d034a5559576c83f5eced768b2b2b77.tar.gz
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.
-rw-r--r--lisp/org-macs.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index a057ae5..0653f6a 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)