comparison lisp/calendar/calendar.el @ 6124:56546a41a683

* calendar.el (calendar-current-date): Use fixed assoc list for month names so that changing the array of names doesn't screw up the determination of the current date.
author Edward M. Reingold <reingold@emr.cs.iit.edu>
date Tue, 01 Mar 1994 22:42:53 +0000
parents 324bb3410cfb
children 5ab295d49e7f
comparison
equal deleted inserted replaced
6123:3c66892f0083 6124:56546a41a683
1930 "^\\([A-Z][a-z]*\\) *\\([A-Z][a-z]*\\) *\\([0-9]*\\) .* \\([0-9]*\\)$" 1930 "^\\([A-Z][a-z]*\\) *\\([A-Z][a-z]*\\) *\\([0-9]*\\) .* \\([0-9]*\\)$"
1931 date)) 1931 date))
1932 (month 1932 (month
1933 (cdr (assoc 1933 (cdr (assoc
1934 (substring date (match-beginning 2) (match-end 2)) 1934 (substring date (match-beginning 2) (match-end 2))
1935 (calendar-make-alist 1935 '(("Jan" . 1) ("Feb" . 2) ("Mar" . 3) ("Apr" . 4)
1936 calendar-month-name-array 1936 ("May" . 5) ("Jun" . 6) ("Jul" . 7) ("Aug" . 8)
1937 1 1937 ("Sep" . 9) ("Oct" . 10) ("Nov" . 11) ("Dec" . 12)))))
1938 '(lambda (x) (substring x 0 3))))))
1939 (day 1938 (day
1940 (string-to-int (substring date (match-beginning 3) (match-end 3)))) 1939 (string-to-int (substring date (match-beginning 3) (match-end 3))))
1941 (year 1940 (year
1942 (string-to-int (substring date (match-beginning 4) (match-end 4))))) 1941 (string-to-int (substring date (match-beginning 4) (match-end 4)))))
1943 (list month day year))) 1942 (list month day year)))