1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-20 20:50:53 -08:00

(solar-degrees-to-hours, solar-hours-to-days): Force floating result.

(sunrise-sunset): Don't alter calendar-daylight-savings-starts
and calendar-daylight-savings-ends.
This commit is contained in:
Richard M. Stallman 1994-05-01 07:39:02 +00:00
parent f58434539e
commit 2d2bdb7aba

View file

@ -183,10 +183,10 @@ Returns nil if nothing was entered."
"Eccentricity of orbit of the earth around the sun.") "Eccentricity of orbit of the earth around the sun.")
(defmacro solar-degrees-to-hours (deg) (defmacro solar-degrees-to-hours (deg)
(list '/ deg 15)) (list '/ deg 15.0))
(defmacro solar-hours-to-days (hour) (defmacro solar-hours-to-days (hour)
(list '/ hour 24)) (list '/ hour 24.0))
(defun solar-longitude-of-sun (day) (defun solar-longitude-of-sun (day)
"Longitude of the sun at DAY in the year." "Longitude of the sun at DAY in the year."
@ -429,10 +429,12 @@ This function is suitable for execution in a .emacs file."
((< calendar-time-zone 0) ((< calendar-time-zone 0)
(format "UTC%dmin" calendar-time-zone)) (format "UTC%dmin" calendar-time-zone))
(t (format "UTC+%dmin" calendar-time-zone))))) (t (format "UTC+%dmin" calendar-time-zone)))))
(calendar-daylight-savings-starts ;; Use outer context values always, unless you're going to prompt for
(if (< arg 16) calendar-daylight-savings-starts)) ;; the values to use. PKH
(calendar-daylight-savings-ends ;; (calendar-daylight-savings-starts
(if (< arg 16) calendar-daylight-savings-ends)) ;; (if (< arg 16) calendar-daylight-savings-starts))
;; (calendar-daylight-savings-ends
;; (if (< arg 16) calendar-daylight-savings-ends))
(date (if (< arg 4) (calendar-current-date) (calendar-read-date))) (date (if (< arg 4) (calendar-current-date) (calendar-read-date)))
(date-string (calendar-date-string date t)) (date-string (calendar-date-string date t))
(time-string (solar-sunrise-sunset date)) (time-string (solar-sunrise-sunset date))