Function: calcFunc-badd
calcFunc-badd is an autoloaded and byte-compiled function defined in
calc-forms.el.gz.
Signature
(calcFunc-badd A B)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-forms.el.gz
(defun calcFunc-badd (a b)
(if (eq (car-safe b) 'date)
(if (eq (car-safe a) 'date)
(math-reject-arg nil "*Invalid combination in date arithmetic")
(calcFunc-badd b a))
(if (eq (car-safe a) 'date)
(if (Math-realp b)
(if (Math-zerop b)
a
(let* ((d (math-to-business-day a))
(bb (math-add (car d)
(if (and (cdr d) (Math-posp b))
(math-sub b 1) b))))
(or (math-from-business-day bb)
(calcFunc-badd a b))))
(if (eq (car-safe b) 'hms)
(let ((hours (nth 7 math-holidays-cache)))
(setq b (math-div (math-from-hms b 'deg) 24))
(if hours
(setq b (math-div b (cdr hours))))
(calcFunc-badd a b))
(math-reject-arg nil "*Invalid combination in date arithmetic")))
(math-reject-arg a 'datep))))