Function: org-cmp-ts

org-cmp-ts is a byte-compiled function defined in org-agenda.el.gz.

Signature

(org-cmp-ts A B TYPE)

Documentation

Compare the timestamps values of entries A and B.

When TYPE is "scheduled", "deadline", "timestamp" or
"timestamp_ia", compare within each of these type. When TYPE
is the empty string, compare all timestamps without respect of their type.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-agenda.el.gz
(defsubst org-cmp-ts (a b type)
  "Compare the timestamps values of entries A and B.
When TYPE is \"scheduled\", \"deadline\", \"timestamp\" or
\"timestamp_ia\", compare within each of these type.  When TYPE
is the empty string, compare all timestamps without respect of
their type."
  (let* ((def (if org-agenda-sort-notime-is-late 99999999 -1))
	 (ta (or (and (string-match type (or (get-text-property 1 'type a) ""))
		      (get-text-property 1 'ts-date a))
		 def))
	 (tb (or (and (string-match type (or (get-text-property 1 'type b) ""))
		      (get-text-property 1 'ts-date b))
		 def)))
    (cond ((if ta (and tb (< ta tb)) tb) -1)
	  ((if tb (and ta (< tb ta)) ta) +1))))