[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v |
Date: |
Thu, 20 Mar 2008 04:41:47 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Glenn Morris <gm> 08/03/20 04:41:47
Index: calendar.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/calendar/calendar.el,v
retrieving revision 1.228
retrieving revision 1.229
diff -u -b -r1.228 -r1.229
--- calendar.el 18 Mar 2008 03:33:52 -0000 1.228
+++ calendar.el 20 Mar 2008 04:41:47 -0000 1.229
@@ -2444,54 +2444,57 @@
(format "Day %d of %d; %d day%s remaining in the year"
day year days-remaining (if (= days-remaining 1) "" "s"))))
-(defun calendar-print-other-dates ()
- "Show dates on other calendars for date under the cursor."
- (interactive)
- (let ((date (calendar-cursor-to-date t))
- odate)
- (calendar-in-read-only-buffer other-calendars-buffer
- (calendar-set-mode-line (format "%s (Gregorian)"
- (calendar-date-string date)))
- (apply
- 'insert
+(defun calendar-other-dates (date)
+ "Return a list of strings giving Gregorian DATE in other calendars.
+DATE is (month day year). Calendars that do not apply are omitted."
+ (let (odate)
(delq nil
(list
- (calendar-day-of-year-string date) "\n"
- (format "ISO date: %s\n" (calendar-iso-date-string date))
- (format "Julian date: %s\n"
+ (calendar-day-of-year-string date)
+ (format "ISO date: %s" (calendar-iso-date-string date))
+ (format "Julian date: %s"
(calendar-julian-date-string date))
- (format "Astronomical (Julian) day number (at noon UTC): %s.0\n"
+ (format "Astronomical (Julian) day number (at noon UTC): %s.0"
(calendar-astro-date-string date))
- (format "Fixed (RD) date: %s\n"
+ (format "Fixed (RD) date: %s"
(calendar-absolute-from-gregorian date))
- (format "Hebrew date (before sunset): %s\n"
+ (format "Hebrew date (before sunset): %s"
(calendar-hebrew-date-string date))
- (format "Persian date: %s\n"
+ (format "Persian date: %s"
(calendar-persian-date-string date))
(unless (string-equal
(setq odate (calendar-islamic-date-string date))
"")
- (format "Islamic date (before sunset): %s\n" odate))
+ (format "Islamic date (before sunset): %s" odate))
(unless (string-equal
(setq odate (calendar-bahai-date-string date))
"")
- (format "Baha'i date (before sunset): %s\n" odate))
- (format "Chinese date: %s\n"
+ (format "Baha'i date: %s" odate))
+ (format "Chinese date: %s"
(calendar-chinese-date-string date))
(unless (string-equal
(setq odate (calendar-coptic-date-string date))
"")
- (format "Coptic date: %s\n" odate))
+ (format "Coptic date: %s" odate))
(unless (string-equal
(setq odate (calendar-ethiopic-date-string date))
"")
- (format "Ethiopic date: %s\n" e))
+ (format "Ethiopic date: %s" odate))
(unless (string-equal
(setq odate (calendar-french-date-string date))
"")
- (format "French Revolutionary date: %s\n" odate))
- (format "Mayan date: %s\n"
- (calendar-mayan-date-string date))))))))
+ (format "French Revolutionary date: %s" odate))
+ (format "Mayan date: %s"
+ (calendar-mayan-date-string date))))))
+
+(defun calendar-print-other-dates ()
+ "Show dates on other calendars for date under the cursor."
+ (interactive)
+ (let ((date (calendar-cursor-to-date t)))
+ (calendar-in-read-only-buffer other-calendars-buffer
+ (calendar-set-mode-line (format "%s (Gregorian)"
+ (calendar-date-string date)))
+ (insert (mapconcat 'identity (calendar-other-dates date) "\n")))))
(defun calendar-print-day-of-year ()
"Show day number in year/days remaining in year for date under the cursor."
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, (continued)
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/10
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/13
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/13
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/13
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/13
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/14
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/14
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/15
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/16
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/17
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v,
Glenn Morris <=
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/24
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/25
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/27
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/27
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/28
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/31
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/31
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/31
- [Emacs-diffs] Changes to emacs/lisp/calendar/calendar.el,v, Glenn Morris, 2008/03/31