]> code.delx.au - gnu-emacs/blobdiff - lisp/calendar/cal-dst.el
Add 2010 to copyright years.
[gnu-emacs] / lisp / calendar / cal-dst.el
index 78ae624dddc5a27b73f62f5f83ea7243f761a96a..c541caa5696d1bc0bbb9059f41b094718d87ae5c 100644 (file)
@@ -1,7 +1,7 @@
 ;;; cal-dst.el --- calendar functions for daylight saving rules
 
 ;; Copyright (C) 1993, 1994, 1995, 1996, 2001, 2002, 2003, 2004, 2005,
-;;   2006, 2007, 2008  Free Software Foundation, Inc.
+;;   2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: Paul Eggert <eggert@twinsun.com>
 ;;         Edward M. Reingold <reingold@cs.uiuc.edu>
@@ -212,12 +212,12 @@ The result has the proper form for `calendar-daylight-savings-starts'."
              rlist)
            ;; 01-01 and 07-01 for this year's Persian calendar.
            ;; FIXME what does the Persian calendar have to do with this?
-           (if (and (= m 3) (<= 20 d) (<= d 21))
-               '((calendar-gregorian-from-absolute
-                  (calendar-persian-to-absolute `(1 1 ,(- year 621))))))
-           (if (and (= m 9) (<= 22 d) (<= d 23))
-               '((calendar-gregorian-from-absolute
-                  (calendar-persian-to-absolute `(7 1 ,(- year 621))))))))
+           (and (= m 3) (memq d '(20 21))
+                '((calendar-gregorian-from-absolute
+                   (calendar-persian-to-absolute `(1 1 ,(- year 621))))))
+           (and (= m 9) (memq d '(22 23))
+                '((calendar-gregorian-from-absolute
+                   (calendar-persian-to-absolute `(7 1 ,(- year 621))))))))
          (prevday-sec (- -1 utc-diff)) ; last sec of previous local day
          (year (1+ y))
          new-rules)
@@ -229,7 +229,7 @@ The result has the proper form for `calendar-daylight-savings-starts'."
         (setq date (cond ((eq (car rule) 'calendar-nth-named-day)
                           (eval (cons 'calendar-nth-named-absday (cdr rule))))
                          ((eq (car rule) 'calendar-gregorian-from-absolute)
-                          (eval (cdr rule)))
+                          (eval (cadr rule)))
                          (t (calendar-absolute-from-gregorian (eval rule)))))
         (or (equal (current-time-zone
                     (calendar-time-from-absolute date prevday-sec))