]> code.delx.au - gnu-emacs/blobdiff - lisp/timezone.el
(log-view-goto-rev): New function for the new VC.
[gnu-emacs] / lisp / timezone.el
index ff04cd13c7f63a56c2601fe6d86b1da4bfd47f0f..d6473158f363781051840e15b121cd4cea1fdcb9 100644 (file)
@@ -1,6 +1,6 @@
 ;;; timezone.el --- time zone package for GNU Emacs
 
-;; Copyright (C) 1990-1993, 1996, 1999 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 1996, 1999 Free Software Foundation, Inc.
 
 ;; Author: Masanobu Umeda
 ;; Maintainer: umerin@mse.kyutech.ac.jp
@@ -196,12 +196,12 @@ Understands the following styles:
          )
     (when year
       (setq year (match-string year date))
-      ;; Guess ambiguous years.  Assume years < 70 don't predate the
-      ;; Unix Epoch, so are 2000+.  Three-digit years -- do they ever
-      ;; occur? -- are (arbitrarily) assumed to be 21st century.
+      ;; Guess ambiguous years.  Assume years < 69 don't predate the
+      ;; Unix Epoch, so are 2000+.  Three-digit years are assumed to
+      ;; be relative to 1900.
       (if (< (length year) 4)
          (let ((y (string-to-int year)))
-           (if (< y 70)
+           (if (< y 69)
                (setq y (+ y 100)))
            (setq year (int-to-string (+ 1900 y)))))
       (setq month
@@ -310,10 +310,12 @@ If LOCAL is nil, it is assumed to be GMT.
 If TIMEZONE is nil, use the local time zone."
   (let* ((date   (timezone-parse-date date))
         (year   (string-to-int (aref date 0)))
-        (year   (cond ((< year 50)
+        (year   (cond ((< year 69)
                        (+ year 2000))
                       ((< year 100)
                        (+ year 1900))
+                      ((< year 1000)   ; possible 3-digit years.
+                       (+ year 1900))
                       (t year)))
         (month  (string-to-int (aref date 1)))
         (day    (string-to-int (aref date 2)))