Function: math-dt-before-p

math-dt-before-p is a byte-compiled function defined in calc-forms.el.gz.

Signature

(math-dt-before-p DT1 DT2)

Documentation

Non-nil if DT1 occurs before DT2.

A DT is a list of the form (YEAR MONTH DAY).

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-forms.el.gz
(defun math-dt-before-p (dt1 dt2)
  "Non-nil if DT1 occurs before DT2.
A DT is a list of the form (YEAR MONTH DAY)."
  (or (Math-lessp (nth 0 dt1) (nth 0 dt2))
      (and (equal (nth 0 dt1) (nth 0 dt2))
           (or (< (nth 1 dt1) (nth 1 dt2))
               (and (= (nth 1 dt1) (nth 1 dt2))
                    (< (nth 2 dt1) (nth 2 dt2)))))))