130
131 set date Showa 63 Dec 30
132 roll year 1
133 # Showa 1 Dec 30 exists.
134 check date Showa 1 Dec 30
135 roll year -1
136 check date Showa 63 Dec 30
137
138 set date Showa 64 Jan 7
139 roll year 1
140 check date Showa 2 Jan 7
141 roll year -1
142 check date Showa 64 Jan 7
143
144 set date Heisei 31 Apr 30
145 roll year 1
146 check date Heisei 1 Apr 30
147 roll year -1
148 check date Heisei 31 Apr 30
149
150 set date NewEra 2 Apr 30
151 get max year
152 assign $result $hmax
153 roll year -1
154 check date NewEra $hmax Apr 30
155 roll year 1
156 check date NewEra 2 Apr 30
157
158 test roll MONTH
159 set date BeforeMeiji 1867 Dec 1
160 roll month 1
161 check date BeforeMeiji 1867 Jan 1
162 roll month -1
163 check date BeforeMeiji 1867 Dec 1
164 roll month 14
165 check date BeforeMeiji 1867 Feb 1
166 roll month -14
167 check date BeforeMeiji 1867 Dec 1
168
169 set date Meiji 1 Dec 1
170 roll month 1
171 check date Meiji 1 Jan 1
172 roll month -1
173 check date Meiji 1 Dec 1
174 roll month 13
175 check date Meiji 1 Jan 1
176 roll month -13
259 set date BeforeMeiji 1 Jan 1
260 get min year
261 assign $result $minyear
262 # actual min date: -292275055.05.17T01:47:04.192+0900
263 set date BeforeMeiji $minyear Dec 31
264 roll month 1
265 check date BeforeMeiji $minyear May 31
266
267 set date BeforeMeiji $minyear Dec 1
268 set timeofday 1 47 4 192
269 roll month 1
270 check date BeforeMeiji $minyear May 17
271 check timeofday 1 47 4 192
272
273 set date BeforeMeiji $minyear Dec 1
274 set timeofday 1 47 4 191
275 roll month 1
276 check date BeforeMeiji $minyear May 18
277 check timeofday 1 47 4 191
278
279 set date NewEra 17 Jan 1
280 get max year
281 assign $result $max
282 set date NewEra $max Jul 28
283 roll month 1
284 check date NewEra $max Aug 17
285 set date NewEra $max Jul 28
286 set timeofday 23 59 59 999
287 roll month 1
288 check date NewEra $max Aug 16
289 check timeofday 23 59 59 999
290
291 test roll WEEK_OF_YEAR
292 use jcal
293 clear all
294 # 1867 Dec 23 is Monday.
295 set date BeforeMeiji 1867 Dec 23
296 roll week_of_year 1
297 check day_of_week Mon
298 check date BeforeMeiji 1867 Jan 7
299 roll week_of_year -1
300 check day_of_week Mon
301 check date BeforeMeiji 1867 Dec 23
302 roll week_of_year 26
303 check day_of_week Mon
304 check date BeforeMeiji 1867 Jul 1
305 roll week_of_year -26
306 check day_of_week Mon
307 check date BeforeMeiji 1867 Dec 23
308
|
130
131 set date Showa 63 Dec 30
132 roll year 1
133 # Showa 1 Dec 30 exists.
134 check date Showa 1 Dec 30
135 roll year -1
136 check date Showa 63 Dec 30
137
138 set date Showa 64 Jan 7
139 roll year 1
140 check date Showa 2 Jan 7
141 roll year -1
142 check date Showa 64 Jan 7
143
144 set date Heisei 31 Apr 30
145 roll year 1
146 check date Heisei 1 Apr 30
147 roll year -1
148 check date Heisei 31 Apr 30
149
150 set date Reiwa 2 Apr 30
151 get max year
152 assign $result $hmax
153 roll year -1
154 check date Reiwa $hmax Apr 30
155 roll year 1
156 check date Reiwa 2 Apr 30
157
158 test roll MONTH
159 set date BeforeMeiji 1867 Dec 1
160 roll month 1
161 check date BeforeMeiji 1867 Jan 1
162 roll month -1
163 check date BeforeMeiji 1867 Dec 1
164 roll month 14
165 check date BeforeMeiji 1867 Feb 1
166 roll month -14
167 check date BeforeMeiji 1867 Dec 1
168
169 set date Meiji 1 Dec 1
170 roll month 1
171 check date Meiji 1 Jan 1
172 roll month -1
173 check date Meiji 1 Dec 1
174 roll month 13
175 check date Meiji 1 Jan 1
176 roll month -13
259 set date BeforeMeiji 1 Jan 1
260 get min year
261 assign $result $minyear
262 # actual min date: -292275055.05.17T01:47:04.192+0900
263 set date BeforeMeiji $minyear Dec 31
264 roll month 1
265 check date BeforeMeiji $minyear May 31
266
267 set date BeforeMeiji $minyear Dec 1
268 set timeofday 1 47 4 192
269 roll month 1
270 check date BeforeMeiji $minyear May 17
271 check timeofday 1 47 4 192
272
273 set date BeforeMeiji $minyear Dec 1
274 set timeofday 1 47 4 191
275 roll month 1
276 check date BeforeMeiji $minyear May 18
277 check timeofday 1 47 4 191
278
279 set date Reiwa 17 Jan 1
280 get max year
281 assign $result $max
282 set date Reiwa $max Jul 28
283 roll month 1
284 check date Reiwa $max Aug 17
285 set date Reiwa $max Jul 28
286 set timeofday 23 59 59 999
287 roll month 1
288 check date Reiwa $max Aug 16
289 check timeofday 23 59 59 999
290
291 test roll WEEK_OF_YEAR
292 use jcal
293 clear all
294 # 1867 Dec 23 is Monday.
295 set date BeforeMeiji 1867 Dec 23
296 roll week_of_year 1
297 check day_of_week Mon
298 check date BeforeMeiji 1867 Jan 7
299 roll week_of_year -1
300 check day_of_week Mon
301 check date BeforeMeiji 1867 Dec 23
302 roll week_of_year 26
303 check day_of_week Mon
304 check date BeforeMeiji 1867 Jul 1
305 roll week_of_year -26
306 check day_of_week Mon
307 check date BeforeMeiji 1867 Dec 23
308
|