Explorar o código

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 %!s(int64=14) %!d(string=hai) anos
pai
achega
fa18c1c232
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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