[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calc/calc-forms.el,v
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calc/calc-forms.el,v |
Date: |
Sat, 17 Mar 2007 17:41:19 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 07/03/17 17:41:19
Index: calc-forms.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/calc/calc-forms.el,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- calc-forms.el 21 Jan 2007 02:42:09 -0000 1.18
+++ calc-forms.el 17 Mar 2007 17:41:19 -0000 1.19
@@ -1312,20 +1312,20 @@
(calcFunc-unixtime (calcFunc-unixtime date z1) z2)))
(defun math-std-daylight-savings (date dt zone bump)
- "Standard North American daylight savings algorithm.
-This implements the rules for the U.S. and Canada as of 1987.
-Daylight savings begins on the first Sunday of April at 2 a.m.,
-and ends on the last Sunday of October at 2 a.m."
- (cond ((< (nth 1 dt) 4) 0)
- ((= (nth 1 dt) 4)
- (let ((sunday (math-prev-weekday-in-month date dt 7 0)))
+ "Standard North American daylight saving algorithm.
+This implements the rules for the U.S. and Canada as of 2007.
+Daylight saving begins on the second Sunday of March at 2 a.m.,
+and ends on the first Sunday of November at 2 a.m."
+ (cond ((< (nth 1 dt) 3) 0)
+ ((= (nth 1 dt) 3)
+ (let ((sunday (math-prev-weekday-in-month date dt 14 0)))
(cond ((< (nth 2 dt) sunday) 0)
((= (nth 2 dt) sunday)
(if (>= (nth 3 dt) (+ 3 bump)) -1 0))
(t -1))))
- ((< (nth 1 dt) 10) -1)
- ((= (nth 1 dt) 10)
- (let ((sunday (math-prev-weekday-in-month date dt 31 0)))
+ ((< (nth 1 dt) 11) -1)
+ ((= (nth 1 dt) 11)
+ (let ((sunday (math-prev-weekday-in-month date dt 7 0)))
(cond ((< (nth 2 dt) sunday) -1)
((= (nth 2 dt) sunday)
(if (>= (nth 3 dt) (+ 2 bump)) 0 -1))
- [Emacs-diffs] Changes to emacs/lisp/calc/calc-forms.el,v, Glenn Morris, 2007/03/12
- [Emacs-diffs] Changes to emacs/lisp/calc/calc-forms.el,v,
Chong Yidong <=
- [Emacs-diffs] Changes to emacs/lisp/calc/calc-forms.el,v, Jay Belanger, 2007/03/18
- [Emacs-diffs] Changes to emacs/lisp/calc/calc-forms.el,v, Kim F. Storm, 2007/03/19
- [Emacs-diffs] Changes to emacs/lisp/calc/calc-forms.el,v, Glenn Morris, 2007/03/19