comparison lisp/vc.el @ 25553:3af0f2f6145c

(vc-annotate-display): Treat 2-digit years under 70 as 20YY.
author Richard M. Stallman <rms@gnu.org>
date Mon, 06 Sep 1999 03:46:33 +0000
parents 48c997ce6c8d
children 913fac3ab440
comparison
equal deleted inserted replaced
25552:fbfe59033eaf 25553:3af0f2f6145c
3 ;; Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. 3 ;; Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
4 4
5 ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> 5 ;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
6 ;; Maintainer: Andre Spiegel <spiegel@inf.fu-berlin.de> 6 ;; Maintainer: Andre Spiegel <spiegel@inf.fu-berlin.de>
7 7
8 ;; $Id: vc.el,v 1.251 1999/08/27 07:59:22 schwab Exp eliz $ 8 ;; $Id: vc.el,v 1.252 1999/09/02 12:50:28 eliz Exp rms $
9 9
10 ;; This file is part of GNU Emacs. 10 ;; This file is part of GNU Emacs.
11 11
12 ;; GNU Emacs is free software; you can redistribute it and/or modify 12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by 13 ;; it under the terms of the GNU General Public License as published by
2472 ;; be corrupted by extent functions in XEmacs. Access 2472 ;; be corrupted by extent functions in XEmacs. Access
2473 ;; string-matches first. 2473 ;; string-matches first.
2474 (day (string-to-number (match-string 1))) 2474 (day (string-to-number (match-string 1)))
2475 (month (cdr (assoc (match-string 2) local-month-numbers))) 2475 (month (cdr (assoc (match-string 2) local-month-numbers)))
2476 (year-tmp (string-to-number (match-string 3))) 2476 (year-tmp (string-to-number (match-string 3)))
2477 (year (+ (if (> 100 year-tmp) 1900 0) year-tmp)) ; Possible millenium problem 2477 ;; Years 0..69 are 2000..2069.
2478 ;; Years 70..99 are 1970..1999.
2479 (year (+ (cond ((> 70 year-tmp) 2000)
2480 ((> 100 year-tmp) 1900)
2481 (t 0))
2482 year-tmp))
2478 (high (- (car (current-time)) 2483 (high (- (car (current-time))
2479 (car (encode-time 0 0 0 day month year)))) 2484 (car (encode-time 0 0 0 day month year))))
2480 (color (cond ((vc-annotate-compcar high (cond (color-map) 2485 (color (cond ((vc-annotate-compcar high (cond (color-map)
2481 (vc-annotate-color-map)))) 2486 (vc-annotate-color-map))))
2482 ((cons nil vc-annotate-very-old-color)))) 2487 ((cons nil vc-annotate-very-old-color))))