• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/calendar/

Lines Matching defs:date

39 (defvar date)
43 (defvar original-date)
53 "Absolute date of start of Islamic calendar = August 29, 284 A.D. (Julian).")
67 (defun islamic-calendar-day-number (date)
68 "Return the day number within the year of the Islamic date DATE."
69 (let* ((month (extract-calendar-month date))
70 (day (extract-calendar-day date)))
75 (defun calendar-absolute-from-islamic (date)
76 "Absolute date of Islamic DATE.
77 The absolute date is the number of days elapsed since the (imaginary)
78 Gregorian date Sunday, December 31, 1 BC."
79 (let* ((month (extract-calendar-month date))
80 (day (extract-calendar-day date))
81 (year (extract-calendar-year date))
88 (+ (islamic-calendar-day-number date);; days so far this year
94 (defun calendar-islamic-from-absolute (date)
95 "Compute the Islamic date (month day year) corresponding to absolute DATE.
96 The absolute date is the number of days elapsed since the (imaginary)
97 Gregorian date Sunday, December 31, 1 BC."
98 (if (< date calendar-islamic-epoch)
99 (list 0 0 0);; pre-Islamic date
100 (let* ((approx (/ (- date calendar-islamic-epoch)
105 (>= date (calendar-absolute-from-islamic
110 (> date
118 (- date
122 (defun calendar-islamic-date-string (&optional date)
123 "String of Islamic date before sunset of Gregorian DATE.
125 Defaults to today's date if DATE is not given.
126 Driven by the variable `calendar-date-display-form'."
128 (islamic-date (calendar-islamic-from-absolute
130 (or date (calendar-current-date))))))
131 (if (< (extract-calendar-year islamic-date) 1)
133 (calendar-date-string islamic-date nil t))))
135 (defun calendar-print-islamic-date ()
136 "Show the Islamic calendar equivalent of the date under the cursor."
138 (let ((i (calendar-islamic-date-string (calendar-cursor-to-date t))))
141 (message "Islamic date (until sunset): %s" i))))
143 (defun calendar-goto-islamic-date (date &optional noecho)
144 "Move cursor to Islamic DATE; echo Islamic date unless NOECHO is t."
146 (let* ((today (calendar-current-date))
167 (calendar-goto-date (calendar-gregorian-from-absolute
168 (calendar-absolute-from-islamic date)))
169 (or noecho (calendar-print-islamic-date)))
171 (defun diary-islamic-date ()
172 "Islamic calendar equivalent of date diary entry."
173 (let ((i (calendar-islamic-date-string date)))
176 (format "Islamic date (until sunset): %s" i))))
181 Gregorian date in the form of the list (((month day year) STRING)). Returns
183 (let* ((islamic-date (calendar-islamic-from-absolute
186 (m (extract-calendar-month islamic-date))
187 (y (extract-calendar-year islamic-date))
188 (date))
192 (if (> m 7);; Islamic date might be visible
193 (let ((date (calendar-gregorian-from-absolute
195 (if (calendar-date-is-visible-p date)
196 (list (list date string))))))))
199 "Add any Islamic date entries from the diary file to `diary-entries-list'.
200 Islamic date diary entries must be prefaced by an `islamic-diary-entry-symbol'
201 \(normally an `I'). The same diary date forms govern the style of the Islamic
204 Dhu al-Hijjah. If an Islamic date diary entry begins with a
211 (gdate original-date)
214 (let* ((d diary-date-forms)
222 ((date-form (if (equal (car (car d)) 'backup)
249 (mapconcat 'eval date-form "\\)\\(")
258 ;; Diary entry that consists only of date.
263 (date-start))
265 (setq date-start (point))
270 (subst-char-in-region date-start (point) ?\^M ?\n t)
275 (1+ date-start) (1- entry-start))
285 "Mark days in the calendar window that have Islamic date diary entries.
287 is marked. Islamic date entries are prefaced by a islamic-diary-entry-symbol
288 \(normally an `I'). The same diary-date-forms govern the style of the Islamic
291 Dhu al-Hijjah. Islamic date diary entries that begin with a
294 (let ((d diary-date-forms))
297 ((date-form (if (equal (car (car d)) 'backup)
308 (l (length date-form))
309 (d-name-pos (- l (length (memq 'dayname date-form))))
311 (m-name-pos (- l (length (memq 'monthname date-form))))
313 (d-pos (- l (length (memq 'day date-form))))
315 (m-pos (- l (length (memq 'month date-form))))
317 (y-pos (- l (length (memq 'year date-form))))
324 (mapconcat 'eval date-form "\\)\\(")
363 (calendar-current-date)))))
384 (mark-islamic-calendar-date-pattern mm dd yy)))))
387 (defun mark-islamic-calendar-date-pattern (month day year)
388 "Mark dates in calendar window that conform to Islamic date MONTH/DAY/YEAR.
394 ;; Fully specified Islamic date.
395 (let ((date (calendar-gregorian-from-absolute
398 (if (calendar-date-is-visible-p date)
399 (mark-visible-calendar-date date)))
401 (let* ((islamic-date (calendar-islamic-from-absolute
404 (m (extract-calendar-month islamic-date))
405 (y (extract-calendar-year islamic-date))
406 (date))
410 (if (> m 7);; Islamic date might be visible
411 (let ((date (calendar-gregorian-from-absolute
414 (if (calendar-date-is-visible-p date)
415 (mark-visible-calendar-date date)))))))
421 (first-date)
422 (last-date))
424 (setq first-date
428 (setq last-date
431 (calendar-for-loop date from first-date to last-date do
432 (let* ((i-date (calendar-islamic-from-absolute date))
433 (i-month (extract-calendar-month i-date))
434 (i-day (extract-calendar-day i-date))
435 (i-year (extract-calendar-year i-date)))
442 (mark-visible-calendar-date
443 (calendar-gregorian-from-absolute date)))))))))
447 For the Islamic date corresponding to the date indicated by point.
454 (calendar-date-string
457 (calendar-cursor-to-date t)))
463 For the day of the Islamic month corresponding to the date indicated by point.
466 (let* ((calendar-date-display-form
472 (calendar-date-string
475 (calendar-cursor-to-date t)))))
480 For the day of the Islamic year corresponding to the date indicated by point.
483 (let* ((calendar-date-display-form
491 (calendar-date-string
494 (calendar-cursor-to-date t)))))