Commit 1da6c701 authored by Carsten Dominik's avatar Carsten Dominik
Browse files

2008-05-05 Carsten Dominik <dominik@science.uva.nl>

	* textmodes/org.el (org-read-date-get-relative): Interpret lone
	weekday abbreviation as relative to today.
parent 139c6840
...@@ -18060,13 +18060,15 @@ WHAT is \"d\", \"w\", \"m\", or \"y\" for day, week, month, year. ...@@ -18060,13 +18060,15 @@ WHAT is \"d\", \"w\", \"m\", or \"y\" for day, week, month, year.
N is the number of WHATs to shift. N is the number of WHATs to shift.
DEF-FLAG is t when a double ++ or -- indicates shift relative to DEF-FLAG is t when a double ++ or -- indicates shift relative to
the DEFAULT date rather than TODAY." the DEFAULT date rather than TODAY."
(when (string-match (when (and
(concat (string-match
"\\`[ \t]*\\([-+]\\{1,2\\}\\)" (concat
"\\([0-9]+\\)?" "\\`[ \t]*\\([-+]\\{0,2\\}\\)"
"\\([dwmy]\\|\\(" (mapconcat 'car parse-time-weekdays "\\|") "\\)\\)?" "\\([0-9]+\\)?"
"\\([ \t]\\|$\\)") s) "\\([dwmy]\\|\\(" (mapconcat 'car parse-time-weekdays "\\|") "\\)\\)?"
(let* ((dir (if (match-end 1) "\\([ \t]\\|$\\)") s)
(or (> (match-end 1) (match-beginning 1)) (match-end 4)))
(let* ((dir (if (> (match-end 1) (match-beginning 1))
(string-to-char (substring (match-string 1 s) -1)) (string-to-char (substring (match-string 1 s) -1))
?+)) ?+))
(rel (and (match-end 1) (= 2 (- (match-end 1) (match-beginning 1))))) (rel (and (match-end 1) (= 2 (- (match-end 1) (match-beginning 1)))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment