aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman1994-05-01 07:39:02 +0000
committerRichard M. Stallman1994-05-01 07:39:02 +0000
commit2d2bdb7aba417ee2f1145d14110d7eb0a56eaecc (patch)
treeecd7bde63a3a5ef12e664d60acc2b7e116be5430 /lisp
parentf58434539e75f5ae6a125429bd14b1b7d0bdb8e1 (diff)
downloademacs-2d2bdb7aba417ee2f1145d14110d7eb0a56eaecc.tar.gz
emacs-2d2bdb7aba417ee2f1145d14110d7eb0a56eaecc.zip
(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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/calendar/solar.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index 2cd0541986e..723980a6690 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -183,10 +183,10 @@ Returns nil if nothing was entered."
183 "Eccentricity of orbit of the earth around the sun.") 183 "Eccentricity of orbit of the earth around the sun.")
184 184
185(defmacro solar-degrees-to-hours (deg) 185(defmacro solar-degrees-to-hours (deg)
186 (list '/ deg 15)) 186 (list '/ deg 15.0))
187 187
188(defmacro solar-hours-to-days (hour) 188(defmacro solar-hours-to-days (hour)
189 (list '/ hour 24)) 189 (list '/ hour 24.0))
190 190
191(defun solar-longitude-of-sun (day) 191(defun solar-longitude-of-sun (day)
192 "Longitude of the sun at DAY in the year." 192 "Longitude of the sun at DAY in the year."
@@ -429,10 +429,12 @@ This function is suitable for execution in a .emacs file."
429 ((< calendar-time-zone 0) 429 ((< calendar-time-zone 0)
430 (format "UTC%dmin" calendar-time-zone)) 430 (format "UTC%dmin" calendar-time-zone))
431 (t (format "UTC+%dmin" calendar-time-zone))))) 431 (t (format "UTC+%dmin" calendar-time-zone)))))
432 (calendar-daylight-savings-starts 432;; Use outer context values always, unless you're going to prompt for
433 (if (< arg 16) calendar-daylight-savings-starts)) 433;; the values to use. PKH
434 (calendar-daylight-savings-ends 434;; (calendar-daylight-savings-starts
435 (if (< arg 16) calendar-daylight-savings-ends)) 435;; (if (< arg 16) calendar-daylight-savings-starts))
436;; (calendar-daylight-savings-ends
437;; (if (< arg 16) calendar-daylight-savings-ends))
436 (date (if (< arg 4) (calendar-current-date) (calendar-read-date))) 438 (date (if (< arg 4) (calendar-current-date) (calendar-read-date)))
437 (date-string (calendar-date-string date t)) 439 (date-string (calendar-date-string date t))
438 (time-string (solar-sunrise-sunset date)) 440 (time-string (solar-sunrise-sunset date))