mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-21 05:00:47 -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:
parent
f58434539e
commit
2d2bdb7aba
1 changed files with 8 additions and 6 deletions
|
|
@ -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))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue