aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Fox1993-09-21 07:46:03 +0000
committerBrian Fox1993-09-21 07:46:03 +0000
commitfc68b5523cf618d3236751f76ebb1e3720717896 (patch)
treec1b8eede7a74209575c4af0772a06bbed675dd1c
parent7e37cd30c65126d82b38d86d2acb822aa0f25604 (diff)
downloademacs-fc68b5523cf618d3236751f76ebb1e3720717896.tar.gz
emacs-fc68b5523cf618d3236751f76ebb1e3720717896.zip
(s-hemi-seasons n-hemi-seasons): New constants are hemisphere
dependent list of season names. The names are "international"; i.e., `vernal' and `autumnal' are used consistently. (solar-equinoxes-solstices): Use new constants, allowing southern hemisphere reports to be meaningful. (sunrise-sunset): Use `frame-width' instead of `screen-width'.
-rw-r--r--lisp/calendar/solar.el25
1 files changed, 13 insertions, 12 deletions
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index ccfb4a34464..ecc3f6bec1a 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -105,6 +105,15 @@ value and might not know how to override it.")
105 "*Expression evaluating to name of `calendar-longitude', calendar-latitude'. 105 "*Expression evaluating to name of `calendar-longitude', calendar-latitude'.
106Default value is just the latitude, longitude pair.") 106Default value is just the latitude, longitude pair.")
107 107
108;;; List of names of the seasons, dependent on your hemisphere.
109(defconst n-hemi-seasons
110 '("Vernal Equinox" "Summer Solstice" "Autumnal Equinox" "Winter Solstice")
111 "List of season changes for the northern hemisphere.")
112
113(defconst s-hemi-seasons
114 '("Autumnal Equinox" "Winter Solstice" "Vernal Equinox" "Summer Solstice")
115 "List of season changes for the southern hemisphere.")
116
108(defun solar-setup () 117(defun solar-setup ()
109 "Prompt user for latitude, longitude, and time zone." 118 "Prompt user for latitude, longitude, and time zone."
110 (beep) 119 (beep)
@@ -495,18 +504,10 @@ Requires floating point."
495 (date (list (extract-calendar-month date) 504 (date (list (extract-calendar-month date)
496 (truncate day) 505 (truncate day)
497 (extract-calendar-year date)))) 506 (extract-calendar-year date))))
498 (list 507 (list (list date
499 (list date 508 (format "%s %s"
500 (format "%s %s" 509 (nth k (if s-hemi s-hemi-seasons n-hemi-seasons))
501 (cond ((= k 0) 510 (solar-time-string time date)))))))
502 (if s-hemi "Autumnal Equinox" "Vernal Equinox"))
503 ((= k 1)
504 (if s-hemi "Winter Solstice" "Summer Solstice"))
505 ((= k 2)
506 (if s-hemi "Vernal Equinox" "Autumnal Equinox"))
507 ((= k 3)
508 (if s-hemi "Summer Solstice" "Winter Solstice")))
509 (solar-time-string time date)))))))
510 511
511(provide 'solar) 512(provide 'solar)
512 513