Function: org-at-date-range-p

org-at-date-range-p is a byte-compiled function defined in org.el.gz.

Signature

(org-at-date-range-p &optional INACTIVE-OK)

Documentation

Non-nil if point is inside a date range.

When optional argument INACTIVE-OK is non-nil, also consider inactive time ranges.

When this function returns a non-nil value, match data is set according to org-tr-regexp-both or org-tr-regexp, depending on INACTIVE-OK.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-at-date-range-p (&optional inactive-ok)
  "Non-nil if point is inside a date range.

When optional argument INACTIVE-OK is non-nil, also consider
inactive time ranges.

When this function returns a non-nil value, match data is set
according to `org-tr-regexp-both' or `org-tr-regexp', depending
on INACTIVE-OK."
  (save-excursion
    (catch 'exit
      (let ((pos (point)))
	(skip-chars-backward "^[<\r\n")
	(skip-chars-backward "<[")
	(and (looking-at (if inactive-ok org-tr-regexp-both org-tr-regexp))
	     (>= (match-end 0) pos)
	     (throw 'exit t))
	(skip-chars-backward "^<[\r\n")
	(skip-chars-backward "<[")
	(and (looking-at (if inactive-ok org-tr-regexp-both org-tr-regexp))
	     (>= (match-end 0) pos)
	     (throw 'exit t)))
      nil)))