diff options
author | Brian Fox <bfox@gnu.org> | 1993-09-21 07:46:03 +0000 |
---|---|---|
committer | Brian Fox <bfox@gnu.org> | 1993-09-21 07:46:03 +0000 |
commit | cd8a1d6b465cb1c7f8dd3ecddb62d58ee20ba1bf (patch) | |
tree | 78367ef4ad092899890fe9e96b23af957c8ab9c1 /lisp/calendar | |
parent | a63fa349efe91ba2bf1997c97b8d701d8f8a0160 (diff) | |
download | emacs-cd8a1d6b465cb1c7f8dd3ecddb62d58ee20ba1bf.tar.gz |
(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'.
Diffstat (limited to 'lisp/calendar')
-rw-r--r-- | lisp/calendar/solar.el | 25 |
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.") "*Expression evaluating to name of `calendar-longitude', calendar-latitude'. Default value is just the latitude, longitude pair.") +;;; List of names of the seasons, dependent on your hemisphere. +(defconst n-hemi-seasons + '("Vernal Equinox" "Summer Solstice" "Autumnal Equinox" "Winter Solstice") + "List of season changes for the northern hemisphere.") + +(defconst s-hemi-seasons + '("Autumnal Equinox" "Winter Solstice" "Vernal Equinox" "Summer Solstice") + "List of season changes for the southern hemisphere.") + (defun solar-setup () "Prompt user for latitude, longitude, and time zone." (beep) @@ -495,18 +504,10 @@ Requires floating point." (date (list (extract-calendar-month date) (truncate day) (extract-calendar-year date)))) - (list - (list date - (format "%s %s" - (cond ((= k 0) - (if s-hemi "Autumnal Equinox" "Vernal Equinox")) - ((= k 1) - (if s-hemi "Winter Solstice" "Summer Solstice")) - ((= k 2) - (if s-hemi "Vernal Equinox" "Autumnal Equinox")) - ((= k 3) - (if s-hemi "Summer Solstice" "Winter Solstice"))) - (solar-time-string time date))))))) + (list (list date + (format "%s %s" + (nth k (if s-hemi s-hemi-seasons n-hemi-seasons)) + (solar-time-string time date))))))) (provide 'solar) |