comparison lisp/calendar/cal-china.el @ 92660:e64439fb46dc

(chinese-calendar-time-zone, chinese-calendar-daylight-time-offset) (chinese-calendar-daylight-savings-starts) (chinese-calendar-daylight-savings-ends) (chinese-calendar-daylight-savings-starts-time) (chinese-calendar-daylight-savings-ends-time) (chinese-zodiac-sign-on-or-after, chinese-new-moon-on-or-after): Doc fixes.
author Glenn Morris <rgm@gnu.org>
date Sat, 08 Mar 2008 21:36:38 +0000
parents b3055031d5ea
children 02fc7543d146
comparison
equal deleted inserted replaced
92659:678337768a80 92660:e64439fb46dc
56 56
57 (defcustom chinese-calendar-time-zone 57 (defcustom chinese-calendar-time-zone
58 '(if (< year 1928) 58 '(if (< year 1928)
59 (+ 465 (/ 40.0 60.0)) 59 (+ 465 (/ 40.0 60.0))
60 480) 60 480)
61 "Number of minutes difference between local standard time for Chinese 61 "Minutes difference between local standard time for Chinese calendar and UTC.
62 calendar and Coordinated Universal (Greenwich) Time. Default is for Beijing. 62 Default is for Beijing. This is an expression in `year' since it changed at 1928-01-01 00:00:00 from UT+7:45:40 to UT+8."
63 This is an expression in `year' since it changed at 1928-01-01 00:00:00 from
64 UT+7:45:40 to UT+8."
65 :type 'sexp 63 :type 'sexp
66 :group 'chinese-calendar) 64 :group 'chinese-calendar)
67 65
68 (defcustom chinese-calendar-location-name "Beijing" 66 (defcustom chinese-calendar-location-name "Beijing"
69 "Name of location used for calculation of Chinese calendar." 67 "Name of location used for calculation of Chinese calendar."
72 70
73 (defcustom chinese-calendar-daylight-time-offset 0 71 (defcustom chinese-calendar-daylight-time-offset 0
74 ;; The correct value is as follows, but the Chinese calendrical 72 ;; The correct value is as follows, but the Chinese calendrical
75 ;; authorities do NOT use DST in determining astronomical events: 73 ;; authorities do NOT use DST in determining astronomical events:
76 ;; 60 74 ;; 60
77 "Number of minutes difference between daylight saving and standard time 75 "Minutes difference between daylight saving and standard time.
78 for Chinese calendar. Default is for no daylight saving time." 76 Default is for no daylight saving time."
79 :type 'integer 77 :type 'integer
80 :group 'chinese-calendar) 78 :group 'chinese-calendar)
81 79
82 (defcustom chinese-calendar-standard-time-zone-name 80 (defcustom chinese-calendar-standard-time-zone-name
83 '(if (< year 1928) 81 '(if (< year 1928)
98 ;; The correct value is as follows, but the Chinese calendrical 96 ;; The correct value is as follows, but the Chinese calendrical
99 ;; authorities do NOT use DST in determining astronomical events: 97 ;; authorities do NOT use DST in determining astronomical events:
100 ;; '(cond ((< 1986 year) (calendar-nth-named-day 1 0 4 year 10)) 98 ;; '(cond ((< 1986 year) (calendar-nth-named-day 1 0 4 year 10))
101 ;; ((= 1986 year) '(5 4 1986)) 99 ;; ((= 1986 year) '(5 4 1986))
102 ;; (t nil)) 100 ;; (t nil))
103 "Sexp giving the date on which daylight saving time starts for Chinese 101 "Sexp giving the date on which daylight saving time starts.
104 calendar. Default is for no daylight saving time. See documentation of 102 Default is for no daylight saving time. See documentation of
105 `calendar-daylight-savings-starts'." 103 `calendar-daylight-savings-starts'."
106 :type 'sexp 104 :type 'sexp
107 :group 'chinese-calendar) 105 :group 'chinese-calendar)
108 106
109 (defcustom chinese-calendar-daylight-savings-ends nil 107 (defcustom chinese-calendar-daylight-savings-ends nil
110 ;; The correct value is as follows, but the Chinese calendrical 108 ;; The correct value is as follows, but the Chinese calendrical
111 ;; authorities do NOT use DST in determining astronomical events: 109 ;; authorities do NOT use DST in determining astronomical events:
112 ;; '(if (<= 1986 year) (calendar-nth-named-day 1 0 9 year 11)) 110 ;; '(if (<= 1986 year) (calendar-nth-named-day 1 0 9 year 11))
113 "Sexp giving the date on which daylight saving time ends for Chinese 111 "Sexp giving the date on which daylight saving time ends.
114 calendar. Default is for no daylight saving time. See documentation of 112 Default is for no daylight saving time. See documentation of
115 `calendar-daylight-savings-ends'." 113 `calendar-daylight-savings-ends'."
116 :type 'sexp 114 :type 'sexp
117 :group 'chinese-calendar) 115 :group 'chinese-calendar)
118 116
119 (defcustom chinese-calendar-daylight-savings-starts-time 0 117 (defcustom chinese-calendar-daylight-savings-starts-time 0
120 "Number of minutes after midnight that daylight saving time starts for 118 "Number of minutes after midnight that daylight saving time starts.
121 Chinese calendar. Default is for no daylight saving time." 119 Default is for no daylight saving time."
122 :type 'integer 120 :type 'integer
123 :group 'chinese-calendar) 121 :group 'chinese-calendar)
124 122
125 (defcustom chinese-calendar-daylight-savings-ends-time 0 123 (defcustom chinese-calendar-daylight-savings-ends-time 0
126 "Number of minutes after midnight that daylight saving time ends for 124 "Number of minutes after midnight that daylight saving time ends.
127 Chinese calendar. Default is for no daylight saving time." 125 Default is for no daylight saving time."
128 :type 'integer 126 :type 'integer
129 :group 'chinese-calendar) 127 :group 'chinese-calendar)
130 128
131 ;;; End of user options. 129 ;;; End of user options.
132 130
136 134
137 (defconst chinese-calendar-terrestrial-branch 135 (defconst chinese-calendar-terrestrial-branch
138 ["Zi" "Chou" "Yin" "Mao" "Chen" "Si" "Wu" "Wei" "Shen" "You" "Xu" "Hai"]) 136 ["Zi" "Chou" "Yin" "Mao" "Chen" "Si" "Wu" "Wei" "Shen" "You" "Xu" "Hai"])
139 137
140 (defun chinese-zodiac-sign-on-or-after (d) 138 (defun chinese-zodiac-sign-on-or-after (d)
141 "Absolute date of first new Zodiac sign on or after absolute date d. 139 "Absolute date of first new Zodiac sign on or after absolute date D.
142 The Zodiac signs begin when the sun's longitude is a multiple of 30 degrees." 140 The Zodiac signs begin when the sun's longitude is a multiple of 30 degrees."
143 (let* ((year (extract-calendar-year 141 (let* ((year (extract-calendar-year
144 (calendar-gregorian-from-absolute d))) 142 (calendar-gregorian-from-absolute d)))
145 (calendar-time-zone (eval chinese-calendar-time-zone)) 143 (calendar-time-zone (eval chinese-calendar-time-zone))
146 (calendar-daylight-time-offset 144 (calendar-daylight-time-offset
162 (solar-date-next-longitude 160 (solar-date-next-longitude
163 (calendar-astro-from-absolute d) 161 (calendar-astro-from-absolute d)
164 30))))) 162 30)))))
165 163
166 (defun chinese-new-moon-on-or-after (d) 164 (defun chinese-new-moon-on-or-after (d)
167 "Absolute date of first new moon on or after absolute date d." 165 "Absolute date of first new moon on or after absolute date D."
168 (let* ((year (extract-calendar-year 166 (let* ((year (extract-calendar-year
169 (calendar-gregorian-from-absolute d))) 167 (calendar-gregorian-from-absolute d)))
170 (calendar-time-zone (eval chinese-calendar-time-zone)) 168 (calendar-time-zone (eval chinese-calendar-time-zone))
171 (calendar-daylight-time-offset 169 (calendar-daylight-time-offset
172 chinese-calendar-daylight-time-offset) 170 chinese-calendar-daylight-time-offset)