Hi,

I attach a simple patch to enhance handling of two-digit years in
`org-read-date-analyze'.  (I have the FSF papers signed.)

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
>From 6406c46fe1394b107e87012696f058fe5f13215e Mon Sep 17 00:00:00 2001
From: Marcin Borkowski <mb...@mbork.pl>
Date: Thu, 17 Mar 2016 12:50:12 +0100
Subject: [PATCH] Enhance year handling

* lisp/org.el (org-read-date-analyze): Handle two-digit years with
`org-small-year-to-year' instead of just adding 2000
---
 lisp/org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 1f06cbd..9b3af05 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -17011,7 +17011,7 @@ user."
 			  (string-to-number (format-time-string "%Y"))))
 	    month (string-to-number (match-string 3 ans))
 	    day (string-to-number (match-string 4 ans)))
-      (when (< year 100) (setq year (+ 2000 year)))
+      (when (< year 100) (setq year (org-small-year-to-year year)))
       (setq ans (replace-match (format "%04d-%02d-%02d\\5" year month day)
 			       t nil ans)))
 
-- 
2.4.3

Reply via email to