emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/calendar/solar.el,v


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/calendar/solar.el,v
Date: Tue, 01 Apr 2008 02:44:55 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       08/04/01 02:44:52

Index: solar.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/calendar/solar.el,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -b -r1.76 -r1.77
--- solar.el    26 Mar 2008 03:15:02 -0000      1.76
+++ solar.el    1 Apr 2008 02:44:52 -0000       1.77
@@ -28,9 +28,8 @@
 
 ;;; Commentary:
 
-;; This collection of functions implements the features of calendar.el,
-;; diary.el, and holiday.el that deal with times of day, sunrise/sunset, and
-;; equinoxes/solstices.
+;; See calendar.el.  This file implements features that deal with
+;; times of day, sunrise/sunset, and equinoxes/solstices.
 
 ;; Based on the ``Almanac for Computers 1984,'' prepared by the Nautical
 ;; Almanac Office, United States Naval Observatory, Washington, 1984, on
@@ -48,10 +47,6 @@
 ;;    2. Equinox/solstice times will be accurate to the minute for years
 ;;       1951--2050.  For other years the times will be within +/- 1 minute.
 
-;; Technical details of all the calendrical calculations can be found in
-;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
-;; and Nachum Dershowitz, Cambridge University Press (2001).
-
 ;;; Code:
 
 (require 'calendar)
@@ -1018,19 +1013,20 @@
 (defun solar-equinoxes-solstices ()
   "Local date and time of equinoxes and solstices, if visible in the calendar.
 Requires floating point."
-  (let ((m displayed-month)
-        (y displayed-year))
-    (increment-calendar-month m y (cond ((= 1 (% m 3)) -1)
-                                        ((= 2 (% m 3))  1)
-                                        (t              0)))
-    (let* ((calendar-standard-time-zone-name
+  (let* ((m displayed-month)
+         (y displayed-year)
+         (calendar-standard-time-zone-name
             (if calendar-time-zone calendar-standard-time-zone-name "UTC"))
            (calendar-daylight-savings-starts
             (if calendar-time-zone calendar-daylight-savings-starts))
            (calendar-daylight-savings-ends
             (if calendar-time-zone calendar-daylight-savings-ends))
            (calendar-time-zone (if calendar-time-zone calendar-time-zone 0))
-           (k (1- (/ m 3)))
+         (k (progn
+              (increment-calendar-month m y (cond ((= 1 (% m 3)) -1)
+                                                  ((= 2 (% m 3))  1)
+                                                  (t              0)))
+              (1- (/ m 3))))
            (d0 (solar-equinoxes/solstices k y))
            (d1 (list (car d0) (floor (cadr d0)) (nth 2 d0)))
            (h0 (* 24 (- (cadr d0) (floor (cadr d0)))))
@@ -1058,7 +1054,7 @@
                       (* 24 (- abs-day (floor abs-day)))
                       (if (dst-in-effect abs-day)
                           calendar-daylight-time-zone-name
-                        calendar-standard-time-zone-name))))))))
+                      calendar-standard-time-zone-name)))))))
 
 
 (provide 'solar)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]