Function: math-absolute-from-iso-dt

math-absolute-from-iso-dt is a byte-compiled function defined in calc-forms.el.gz.

Signature

(math-absolute-from-iso-dt YEAR WEEK DAY)

Documentation

Return the DATE of the day given by the iso8601 day YEAR WEEK DAY.

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-forms.el.gz
(defun math-absolute-from-iso-dt (year week day)
  "Return the DATE of the day given by the iso8601 day YEAR WEEK DAY."
  (let* ((janfour (math-absolute-from-gregorian-dt year 1 4))
         (prevmon (math-sub janfour
                            (cdr (math-idivmod (math-sub janfour 1) 7)))))
    (math-add
     (math-add prevmon (* (1- week) 7))
     (if (zerop day) 6 (1- day)))))