Function: solar-equinoxes/solstices
solar-equinoxes/solstices is a byte-compiled function defined in
solar.el.gz.
Signature
(solar-equinoxes/solstices K YEAR)
Documentation
Date of equinox/solstice K for YEAR.
K=0, spring equinox; K=1, summer solstice; K=2, fall equinox; K=3, winter solstice. RESULT is a Gregorian local date. Accurate to within a minute between 1951 and 2050.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/solar.el.gz
(defun solar-equinoxes/solstices (k year)
"Date of equinox/solstice K for YEAR.
K=0, spring equinox; K=1, summer solstice; K=2, fall equinox;
K=3, winter solstice. RESULT is a Gregorian local date.
Accurate to within a minute between 1951 and 2050."
(let* ((JDE0 (solar-mean-equinoxes/solstices k year))
(T (/ (- JDE0 2451545.0) 36525))
(W (- (* 35999.373 T) 2.47))
(Delta-lambda (+ 1 (* 0.0334 (solar-cosine-degrees W))
(* 0.0007 (solar-cosine-degrees (* 2 W)))))
(S (apply #'+ (mapcar (lambda(x)
(* (car x) (solar-cosine-degrees
(+ (* (nth 2 x) T) (cadr x)))))
solar-seasons-data)))
(JDE (+ JDE0 (/ (* 0.00001 S) Delta-lambda)))
;; Ephemeris time correction.
(correction (+ 102.3 (* 123.5 T) (* 32.5 T T)))
(JD (- JDE (/ correction 86400)))
(date (calendar-gregorian-from-absolute (floor (- JD 1721424.5))))
(time (- (- JD 0.5) (floor (- JD 0.5)))))
(list (car date) (+ (cadr date) time
(/ (/ calendar-time-zone 60.0) 24.0))
(nth 2 date))))