Function: calendar-iso-read-date
calendar-iso-read-date is a byte-compiled function defined in
cal-iso.el.gz.
Signature
(calendar-iso-read-date &optional DAYFLAG)
Documentation
Interactively read the arguments for an ISO date command.
Reads a year and week, and if DAYFLAG is non-nil a day (otherwise taken to be 1).
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/cal-iso.el.gz
(defun calendar-iso-read-date (&optional dayflag)
"Interactively read the arguments for an ISO date command.
Reads a year and week, and if DAYFLAG is non-nil a day (otherwise
taken to be 1)."
(let* ((year (calendar-read-sexp
"ISO calendar year (>0)"
(lambda (x) (> x 0))
(calendar-extract-year (calendar-current-date))))
(no-weeks (calendar-extract-month
(calendar-iso-from-absolute
(1-
(calendar-dayname-on-or-before
1 (calendar-absolute-from-gregorian
(list 1 4 (1+ year))))))))
(week (calendar-read-sexp
"ISO calendar week (1-%d)"
(lambda (x) (and (> x 0) (<= x no-weeks)))
1
no-weeks))
(day (if dayflag (calendar-read-sexp
"ISO day (1-7)"
(lambda (x) (and (<= 1 x) (<= x 7)))
1)
1)))
(list (list week day year))))