# HG changeset patch # User Brian Fox # Date 748597563 0 # Node ID ec8c8721b7e39b1b3ba520ea7689112abf51b892 # Parent 5815d7b38e9a88d0f7baab44d63752fd2953bca9 (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'. diff -r 5815d7b38e9a -r ec8c8721b7e3 lisp/calendar/solar.el --- a/lisp/calendar/solar.el Tue Sep 21 07:43:20 1993 +0000 +++ b/lisp/calendar/solar.el Tue Sep 21 07:46:03 1993 +0000 @@ -105,6 +105,15 @@ "*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 @@ (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)