# HG changeset patch # User Glenn Morris # Date 1205630605 0 # Node ID 130c0da046a4a3fb23467a04d5cf1d4db4a42788 # Parent 189ca7ef805dca6655d16da53e30f106cba804f4 (calendar-chinese-from-absolute, calendar-chinese-date-string): Expand calendar-mod calls. diff -r 189ca7ef805d -r 130c0da046a4 lisp/calendar/cal-china.el --- a/lisp/calendar/cal-china.el Sun Mar 16 01:22:58 2008 +0000 +++ b/lisp/calendar/cal-china.el Sun Mar 16 01:23:25 2008 +0000 @@ -380,7 +380,8 @@ ;; ...so first month on list is of no interest. (setq list (cdr list))) (list (/ (1- c-year) 60) - (calendar-mod c-year 60) + ;; Remainder of c-year/60 with 60 instead of 0. + (1+ (mod (1- c-year) 60)) (caar list) (1+ (- date (cadr (car list))))))) @@ -420,7 +421,9 @@ (next-month (calendar-absolute-from-chinese (list (if (= year 60) (1+ cycle) cycle) (if (= (floor month) 12) (1+ year) year) - (calendar-mod (1+ (floor month)) 12) + ;; Remainder of (1+(floor month))/12, with + ;; 12 instead of 0. + (1+ (mod (floor month) 12)) 1))) (m-cycle (% (+ (* year 5) (floor month)) 60))) (format "Cycle %s, year %s (%s), %smonth %s%s, day %s (%s)"