Function: lunar-index

lunar-index is a byte-compiled function defined in lunar.el.gz.

Signature

(lunar-index DATE)

Documentation

Return the lunar index for Gregorian date DATE.

This is 4 times the approximate number of new moons since 1 Jan 1900. The factor of 4 allows (mod INDEX 4) to represent the four quarters.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/lunar.el.gz
;; FIXME new-moon index; use in lunar-phase-list implies always below.
(defun lunar-index (date)
  "Return the lunar index for Gregorian date DATE.
This is 4 times the approximate number of new moons since 1 Jan 1900.
The factor of 4 allows (mod INDEX 4) to represent the four quarters."
  (* 4 (truncate
        (* lunar-cycles-per-year
           ;; Years since 1900, as a real.
           (+ (calendar-extract-year date)
              (/ (calendar-day-number date) 366.0)
              -1900)))))