[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calendar/cal-china.el,v
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calendar/cal-china.el,v |
Date: |
Wed, 02 Apr 2008 03:15:55 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Glenn Morris <gm> 08/04/02 03:15:54
Index: cal-china.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/calendar/cal-china.el,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- cal-china.el 1 Apr 2008 02:39:28 -0000 1.42
+++ cal-china.el 2 Apr 2008 03:15:54 -0000 1.43
@@ -422,22 +422,21 @@
"Date of Chinese New Year, if visible in calendar.
Returns (((MONTH DAY YEAR) TEXT)), where the date is Gregorian."
(let ((m displayed-month)
- (y displayed-year))
+ (y displayed-year)
+ chinese-new-year)
;; In the Gregorian calendar, CNY falls between Jan 21 and Feb 20.
;; Jan is visible if displayed-month = 12, 1, 2; Feb if d-m = 1, 2, 3.
;; If we shift the calendar forward one month, we can do a
;; one-sided test, namely: d-m <= 4 means CNY might be visible.
(increment-calendar-month m y 1) ; shift forward a month
- (if (< m 5)
- (let ((chinese-new-year
+ (and (< m 5)
+ (calendar-date-is-visible-p (setq chinese-new-year
(calendar-gregorian-from-absolute
(cadr (assoc 1 (chinese-year y))))))
- (if (calendar-date-is-visible-p chinese-new-year)
(list
(list chinese-new-year
(format "Chinese New Year (%s)"
- (calendar-chinese-sexagesimal-name
- (+ y 57))))))))))
+ (calendar-chinese-sexagesimal-name (+ y 57))))))))
;;;###cal-autoload
(defun calendar-chinese-date-string (&optional date)
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-china.el,v,
Glenn Morris <=
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-china.el,v, Glenn Morris, 2008/04/01
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-china.el,v, Glenn Morris, 2008/04/04
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-china.el,v, Glenn Morris, 2008/04/05
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-china.el,v, Glenn Morris, 2008/04/06
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-china.el,v, Glenn Morris, 2008/04/06
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-china.el,v, Glenn Morris, 2008/04/08
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-china.el,v, Glenn Morris, 2008/04/10
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-china.el,v, Glenn Morris, 2008/04/11
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-china.el,v, Glenn Morris, 2008/04/22