aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/calendar/solar.el59
1 files changed, 31 insertions, 28 deletions
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index effccbf8b0f..51558d9d128 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -1,6 +1,6 @@
1;;; solar.el --- calendar functions for solar events 1;;; solar.el --- calendar functions for solar events
2 2
3;; Copyright (C) 1992, 1993, 1995, 1997 Free Software Foundation, Inc. 3;; Copyright (C) 1992, 1993, 1995, 1997, 2003 Free Software Foundation, Inc.
4 4
5;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> 5;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
6;; Denis B. Roegel <Denis.Roegel@loria.fr> 6;; Denis B. Roegel <Denis.Roegel@loria.fr>
@@ -59,6 +59,9 @@
59 59
60;;; Code: 60;;; Code:
61 61
62(defvar displayed-month)
63(defvar displayed-year)
64
62(if (fboundp 'atan) 65(if (fboundp 'atan)
63 (require 'lisp-float-type) 66 (require 'lisp-float-type)
64 (error "Solar/lunar calculations impossible since floating point is unavailable")) 67 (error "Solar/lunar calculations impossible since floating point is unavailable"))
@@ -939,6 +942,33 @@ use when highlighting the day in the calendar."
939 (format "%s Sabbath candle lighting" 942 (format "%s Sabbath candle lighting"
940 (apply 'solar-time-string light))))))) 943 (apply 'solar-time-string light)))))))
941 944
945; from Meeus, 1991, page 167
946(defconst solar-seasons-data
947 '((485 324.96 1934.136)
948 (203 337.23 32964.467)
949 (199 342.08 20.186)
950 (182 27.85 445267.112)
951 (156 73.14 45036.886)
952 (136 171.52 22518.443)
953 (77 222.54 65928.934)
954 (74 296.72 3034.906)
955 (70 243.58 9037.513)
956 (58 119.81 33718.147)
957 (52 297.17 150.678)
958 (50 21.02 2281.226)
959 (45 247.54 29929.562)
960 (44 325.15 31555.956)
961 (29 60.93 4443.417)
962 (18 155.12 67555.328)
963 (17 288.79 4562.452)
964 (16 198.04 62894.029)
965 (14 199.76 31436.921)
966 (12 95.39 14577.848)
967 (12 287.11 31931.756)
968 (12 320.81 34777.259)
969 (9 227.73 1222.114)
970 (8 15.45 16859.074)))
971
942(defun solar-equinoxes/solstices (k year) 972(defun solar-equinoxes/solstices (k year)
943 "Date of equinox/solstice K for YEAR. 973 "Date of equinox/solstice K for YEAR.
944K=0, spring equinox; K=1, summer solstice; K=2, fall equinox; 974K=0, spring equinox; K=1, summer solstice; K=2, fall equinox;
@@ -1017,33 +1047,6 @@ solstice. These formulas are only to be used between 1000 BC and 3000 AD."
1017 (* -0.00823 z z z) 1047 (* -0.00823 z z z)
1018 (* 0.00032 z z z z))))))) 1048 (* 0.00032 z z z z)))))))
1019 1049
1020; from Meeus, 1991, page 167
1021(defconst solar-seasons-data
1022 '((485 324.96 1934.136)
1023 (203 337.23 32964.467)
1024 (199 342.08 20.186)
1025 (182 27.85 445267.112)
1026 (156 73.14 45036.886)
1027 (136 171.52 22518.443)
1028 (77 222.54 65928.934)
1029 (74 296.72 3034.906)
1030 (70 243.58 9037.513)
1031 (58 119.81 33718.147)
1032 (52 297.17 150.678)
1033 (50 21.02 2281.226)
1034 (45 247.54 29929.562)
1035 (44 325.15 31555.956)
1036 (29 60.93 4443.417)
1037 (18 155.12 67555.328)
1038 (17 288.79 4562.452)
1039 (16 198.04 62894.029)
1040 (14 199.76 31436.921)
1041 (12 95.39 14577.848)
1042 (12 287.11 31931.756)
1043 (12 320.81 34777.259)
1044 (9 227.73 1222.114)
1045 (8 15.45 16859.074)))
1046
1047;;;###autoload 1050;;;###autoload
1048(defun solar-equinoxes-solstices () 1051(defun solar-equinoxes-solstices ()
1049 "*local* date and time of equinoxes and solstices, if visible in the calendar window. 1052 "*local* date and time of equinoxes and solstices, if visible in the calendar window.