Mercurial > hg > xemacs-beta
comparison lisp/utils/timezone.el @ 82:6a378aca36af r20-0b91
Import from CVS: tag r20-0b91
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:07:36 +0200 |
parents | 131b0175ea99 |
children | 364816949b59 |
comparison
equal
deleted
inserted
replaced
81:ebca3d831cea | 82:6a378aca36af |
---|---|
189 (progn | 189 (progn |
190 (setq year | 190 (setq year |
191 (substring date (match-beginning year) (match-end year))) | 191 (substring date (match-beginning year) (match-end year))) |
192 ;; It is now Dec 1992. 8 years before the end of the World. | 192 ;; It is now Dec 1992. 8 years before the end of the World. |
193 (if (< (length year) 4) | 193 (if (< (length year) 4) |
194 (setq year (concat "19" (substring year -2 nil)))) | 194 ;; 2 digit years are bogus, so guess the century |
195 (let ((yr (string-to-int year))) | |
196 (when (>= yr 100) | |
197 ;; What does a three digit year mean? | |
198 (setq yr (- yr 100))) | |
199 (setq year (format "%d%02d" | |
200 (if (< yr 70) | |
201 20 | |
202 19) | |
203 yr)))) | |
195 (let ((string (substring date | 204 (let ((string (substring date |
196 (match-beginning month) | 205 (match-beginning month) |
197 (+ (match-beginning month) 3)))) | 206 (+ (match-beginning month) 3)))) |
198 (setq month | 207 (setq month |
199 (int-to-string | 208 (int-to-string |