Function: org-class

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

Signature

(org-class Y1 M1 D1 Y2 M2 D2 DAYNAME &rest SKIP-WEEKS)

Documentation

Entry applies if date is between dates on DAYNAME, but skips SKIP-WEEKS.

DAYNAME is a number between 0 (Sunday) and 6 (Saturday). SKIP-WEEKS is any number of ISO weeks in the block period for which the item should be skipped. If any of the SKIP-WEEKS arguments is the symbol holidays, then any date that is known by the Emacs calendar to be a holiday will also be skipped. If SKIP-WEEKS arguments are holiday strings, then those holidays will be skipped.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-agenda.el.gz
;; Define the `org-class' function
(defun org-class (y1 m1 d1 y2 m2 d2 dayname &rest skip-weeks)
  "Entry applies if date is between dates on DAYNAME, but skips SKIP-WEEKS.
DAYNAME is a number between 0 (Sunday) and 6 (Saturday).
SKIP-WEEKS is any number of ISO weeks in the block period for which the
item should be skipped.  If any of the SKIP-WEEKS arguments is the symbol
`holidays', then any date that is known by the Emacs calendar to be a
holiday will also be skipped.  If SKIP-WEEKS arguments are holiday strings,
then those holidays will be skipped."
  (with-no-warnings (defvar date) (defvar entry))
  (let* ((date1 (calendar-absolute-from-gregorian (list m1 d1 y1)))
	 (date2 (calendar-absolute-from-gregorian (list m2 d2 y2)))
	 (d (calendar-absolute-from-gregorian date))
	 (h (when skip-weeks (calendar-check-holidays date))))
    (and
     (<= date1 d)
     (<= d date2)
     (= (calendar-day-of-week date) dayname)
     (or (not skip-weeks)
	 (progn
	   (require 'cal-iso)
	   (not (member (car (calendar-iso-from-absolute d)) skip-weeks))))
     (not (or (and h (memq 'holidays skip-weeks))
	      (delq nil (mapcar (lambda(g) (member g skip-weeks)) h))))
     entry)))