Function: math-day-number

math-day-number is a byte-compiled function defined in calc-forms.el.gz.

Signature

(math-day-number YEAR MONTH DAY)

Documentation

Return the number of days of the year up to YEAR MONTH DAY.

The count includes the given date.

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-forms.el.gz
(defun math-day-number (year month day)
  "Return the number of days of the year up to YEAR MONTH DAY.
The count includes the given date."
  (if calc-gregorian-switch
      (cond ((eq year (nth 0 calc-gregorian-switch))
             (1+
              (- (math-absolute-from-dt year month day)
                 (math-absolute-from-dt year 1 1))))
            ((Math-lessp year (nth 0 calc-gregorian-switch))
             (math-day-in-year year month day t))
            (t
             (math-day-in-year year month day)))
    (math-day-in-year year month day)))