Mercurial > emacs
comparison lisp/calendar/cal-islam.el @ 89909:68c22ea6027c
Sync to HEAD
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 16 Apr 2004 12:51:06 +0000 |
parents | 375f2633d815 |
children | 4da4a09e8b1b |
comparison
equal
deleted
inserted
replaced
89908:ee1402f7b568 | 89909:68c22ea6027c |
---|---|
152 (extract-calendar-year | 152 (extract-calendar-year |
153 (calendar-islamic-from-absolute | 153 (calendar-islamic-from-absolute |
154 (calendar-absolute-from-gregorian today)))))) | 154 (calendar-absolute-from-gregorian today)))))) |
155 (month-array calendar-islamic-month-name-array) | 155 (month-array calendar-islamic-month-name-array) |
156 (completion-ignore-case t) | 156 (completion-ignore-case t) |
157 (month (cdr (assoc-ignore-case | 157 (month (cdr (assoc-string |
158 (completing-read | 158 (completing-read |
159 "Islamic calendar month name: " | 159 "Islamic calendar month name: " |
160 (mapcar 'list (append month-array nil)) | 160 (mapcar 'list (append month-array nil)) |
161 nil t) | 161 nil t) |
162 (calendar-make-alist month-array 1)))) | 162 (calendar-make-alist month-array 1) t))) |
163 (last (islamic-calendar-last-day-of-month month year)) | 163 (last (islamic-calendar-last-day-of-month month year)) |
164 (day (calendar-read | 164 (day (calendar-read |
165 (format "Islamic calendar day (1-%d): " last) | 165 (format "Islamic calendar day (1-%d): " last) |
166 '(lambda (x) (and (< 0 x) (<= x last)))))) | 166 '(lambda (x) (and (< 0 x) (<= x last)))))) |
167 (list (list month day year)))) | 167 (list (list month day year)))) |
370 (+ y 100) | 370 (+ y 100) |
371 y))) | 371 y))) |
372 (string-to-int y-str))))) | 372 (string-to-int y-str))))) |
373 (if dd-name | 373 (if dd-name |
374 (mark-calendar-days-named | 374 (mark-calendar-days-named |
375 (cdr (assoc-ignore-case dd-name | 375 (cdr (assoc-string dd-name |
376 (calendar-make-alist | 376 (calendar-make-alist |
377 calendar-day-name-array | 377 calendar-day-name-array |
378 0 nil calendar-day-abbrev-array)))) | 378 0 nil calendar-day-abbrev-array) t))) |
379 (if mm-name | 379 (if mm-name |
380 (setq mm (if (string-equal mm-name "*") 0 | 380 (setq mm (if (string-equal mm-name "*") 0 |
381 (cdr (assoc-ignore-case | 381 (cdr (assoc-string |
382 mm-name | 382 mm-name |
383 (calendar-make-alist | 383 (calendar-make-alist |
384 calendar-islamic-month-name-array)))))) | 384 calendar-islamic-month-name-array) t))))) |
385 (mark-islamic-calendar-date-pattern mm dd yy))))) | 385 (mark-islamic-calendar-date-pattern mm dd yy))))) |
386 (setq d (cdr d))))) | 386 (setq d (cdr d))))) |
387 | 387 |
388 (defun mark-islamic-calendar-date-pattern (month day year) | 388 (defun mark-islamic-calendar-date-pattern (month day year) |
389 "Mark dates in calendar window that conform to Islamic date MONTH/DAY/YEAR. | 389 "Mark dates in calendar window that conform to Islamic date MONTH/DAY/YEAR. |
495 (calendar-cursor-to-date t))))) | 495 (calendar-cursor-to-date t))))) |
496 arg))) | 496 arg))) |
497 | 497 |
498 (provide 'cal-islam) | 498 (provide 'cal-islam) |
499 | 499 |
500 ;;; arch-tag: a951b6c1-6f47-48d5-bac3-1b505cd719f7 | |
500 ;;; cal-islam.el ends here | 501 ;;; cal-islam.el ends here |