Mercurial > emacs
comparison lisp/calendar/solar.el @ 4863:adfd03a381ca
(solar-n-hemi-seasons, solar-s-hemi-seasons): New vars.
(solar-equinoxes-solstices): Use them to fix names for southern hemisphere.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 20 Oct 1993 05:51:19 +0000 |
parents | ec8c8721b7e3 |
children | 9595049f63a9 |
comparison
equal
deleted
inserted
replaced
4862:8f055b119428 | 4863:adfd03a381ca |
---|---|
103 (abs calendar-longitude) | 103 (abs calendar-longitude) |
104 (if (> calendar-longitude 0) "E" "W"))) | 104 (if (> calendar-longitude 0) "E" "W"))) |
105 "*Expression evaluating to name of `calendar-longitude', calendar-latitude'. | 105 "*Expression evaluating to name of `calendar-longitude', calendar-latitude'. |
106 Default value is just the latitude, longitude pair.") | 106 Default value is just the latitude, longitude pair.") |
107 | 107 |
108 ;;; List of names of the seasons, dependent on your hemisphere. | 108 (defvar solar-n-hemi-seasons |
109 (defconst n-hemi-seasons | |
110 '("Vernal Equinox" "Summer Solstice" "Autumnal Equinox" "Winter Solstice") | 109 '("Vernal Equinox" "Summer Solstice" "Autumnal Equinox" "Winter Solstice") |
111 "List of season changes for the northern hemisphere.") | 110 "List of season changes for the northern hemisphere.") |
112 | 111 |
113 (defconst s-hemi-seasons | 112 (defvar solar-s-hemi-seasons |
114 '("Autumnal Equinox" "Winter Solstice" "Vernal Equinox" "Summer Solstice") | 113 '("Autumnal Equinox" "Winter Solstice" "Vernal Equinox" "Summer Solstice") |
115 "List of season changes for the southern hemisphere.") | 114 "List of season changes for the southern hemisphere.") |
116 | 115 |
117 (defun solar-setup () | 116 (defun solar-setup () |
118 "Prompt user for latitude, longitude, and time zone." | 117 "Prompt user for latitude, longitude, and time zone." |
504 (date (list (extract-calendar-month date) | 503 (date (list (extract-calendar-month date) |
505 (truncate day) | 504 (truncate day) |
506 (extract-calendar-year date)))) | 505 (extract-calendar-year date)))) |
507 (list (list date | 506 (list (list date |
508 (format "%s %s" | 507 (format "%s %s" |
509 (nth k (if s-hemi s-hemi-seasons n-hemi-seasons)) | 508 (nth k (if s-hemi solar-s-hemi-seasons |
509 solar-n-hemi-seasons)) | |
510 (solar-time-string time date))))))) | 510 (solar-time-string time date))))))) |
511 | 511 |
512 (provide 'solar) | 512 (provide 'solar) |
513 | 513 |
514 ;;; solar.el ends here | 514 ;;; solar.el ends here |