Parcourir la source

Fix read-date problem that could result in August 34th

Paul Sexton writes:

> Today (31 August),
> if I evaluate "(org-read-date t)", then at the prompt type
> "+3"
> The string returned is:
> "2010-08-34"
Carsten Dominik il y a 14 ans
Parent
commit
fa18c1c232
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      lisp/org.el

+ 4 - 0
lisp/org.el

@@ -14343,6 +14343,10 @@ user."
 	  (setq org-read-date-overlay nil)))))
 
     (setq final (org-read-date-analyze ans def defdecode))
+
+    ;; One round trip to get rid of 34th of August and stuff like that....
+    (setq final (decode-time (apply 'encode-time final)))
+
     (setq org-read-date-final-answer ans)
 
     (if to-time