aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-03-08 21:34:30 +0000
committerGlenn Morris2008-03-08 21:34:30 +0000
commit9c68082d8971e38f7feb48b61a9ff43f02c1fa13 (patch)
treeec1afa7e3666c1312cb46217f1d8851ed851c7bd
parent53bee0c9ea662e4e7a14f04680a0674947586f13 (diff)
downloademacs-9c68082d8971e38f7feb48b61a9ff43f02c1fa13.tar.gz
emacs-9c68082d8971e38f7feb48b61a9ff43f02c1fa13.zip
Formatting changes only.
-rw-r--r--lisp/calendar/cal-hebrew.el181
1 files changed, 93 insertions, 88 deletions
diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el
index d9b1be4ceef..6463a9e2081 100644
--- a/lisp/calendar/cal-hebrew.el
+++ b/lisp/calendar/cal-hebrew.el
@@ -59,37 +59,37 @@
59(defun hebrew-calendar-elapsed-days (year) 59(defun hebrew-calendar-elapsed-days (year)
60 "Days from Sun. prior to start of Hebrew calendar to mean conjunction of Tishri of Hebrew YEAR." 60 "Days from Sun. prior to start of Hebrew calendar to mean conjunction of Tishri of Hebrew YEAR."
61 (let* ((months-elapsed 61 (let* ((months-elapsed
62 (+ (* 235 (/ (1- year) 19));; Months in complete cycles so far. 62 (+ (* 235 (/ (1- year) 19)) ; months in complete cycles so far
63 (* 12 (% (1- year) 19)) ;; Regular months in this cycle 63 (* 12 (% (1- year) 19)) ; regular months in this cycle
64 (/ (1+ (* 7 (% (1- year) 19))) 19)));; Leap months this cycle 64 (/ (1+ (* 7 (% (1- year) 19))) 19))) ; leap months this cycle
65 (parts-elapsed (+ 204 (* 793 (% months-elapsed 1080)))) 65 (parts-elapsed (+ 204 (* 793 (% months-elapsed 1080))))
66 (hours-elapsed (+ 5 66 (hours-elapsed (+ 5
67 (* 12 months-elapsed) 67 (* 12 months-elapsed)
68 (* 793 (/ months-elapsed 1080)) 68 (* 793 (/ months-elapsed 1080))
69 (/ parts-elapsed 1080))) 69 (/ parts-elapsed 1080)))
70 (parts ;; Conjunction parts 70 (parts ; conjunction parts
71 (+ (* 1080 (% hours-elapsed 24)) (% parts-elapsed 1080))) 71 (+ (* 1080 (% hours-elapsed 24)) (% parts-elapsed 1080)))
72 (day ;; Conjunction day 72 (day ; conjunction day
73 (+ 1 (* 29 months-elapsed) (/ hours-elapsed 24))) 73 (+ 1 (* 29 months-elapsed) (/ hours-elapsed 24)))
74 (alternative-day 74 (alternative-day
75 (if (or (>= parts 19440) ;; If the new moon is at or after midday, 75 (if (or (>= parts 19440) ; if the new moon is at or after midday
76 (and (= (% day 7) 2);; ...or is on a Tuesday... 76 (and (= (% day 7) 2) ; ...or is on a Tuesday...
77 (>= parts 9924) ;; at 9 hours, 204 parts or later... 77 (>= parts 9924) ; at 9 hours, 204 parts or later...
78 (not (hebrew-calendar-leap-year-p year)));; of a 78 ;; of a common year...
79 ;; common year, 79 (not (hebrew-calendar-leap-year-p year)))
80 (and (= (% day 7) 1);; ...or is on a Monday... 80 (and (= (% day 7) 1) ; ...or is on a Monday...
81 (>= parts 16789) ;; at 15 hours, 589 parts or later... 81 (>= parts 16789) ; at 15 hours, 589 parts or later...
82 (hebrew-calendar-leap-year-p (1- year))));; at the end 82 ;; at the end of a leap year.
83 ;; of a leap year 83 (hebrew-calendar-leap-year-p (1- year))))
84 ;; Then postpone Rosh HaShanah one day 84 ;; Then postpone Rosh HaShanah one day.
85 (1+ day) 85 (1+ day)
86 ;; Else 86 ;; Else:
87 day))) 87 day)))
88 (if ;; If Rosh HaShanah would occur on Sunday, Wednesday, or Friday 88 ;; If Rosh HaShanah would occur on Sunday, Wednesday, or Friday
89 (memq (% alternative-day 7) (list 0 3 5)) 89 (if (memq (% alternative-day 7) (list 0 3 5))
90 ;; Then postpone it one (more) day and return 90 ;; Then postpone it one (more) day and return.
91 (1+ alternative-day) 91 (1+ alternative-day)
92 ;; Else return 92 ;; Else return.
93 alternative-day))) 93 alternative-day)))
94 94
95(defun hebrew-calendar-days-in-year (year) 95(defun hebrew-calendar-days-in-year (year)
@@ -121,21 +121,21 @@ Gregorian date Sunday, December 31, 1 BC."
121 (let* ((month (extract-calendar-month date)) 121 (let* ((month (extract-calendar-month date))
122 (day (extract-calendar-day date)) 122 (day (extract-calendar-day date))
123 (year (extract-calendar-year date))) 123 (year (extract-calendar-year date)))
124 (+ day ;; Days so far this month. 124 (+ day ; days so far this month
125 (if (< month 7);; before Tishri 125 (if (< month 7) ; before Tishri
126 ;; Then add days in prior months this year before and after Nisan 126 ;; Then add days in prior months this year before and after Nisan.
127 (+ (calendar-sum 127 (+ (calendar-sum
128 m 7 (<= m (hebrew-calendar-last-month-of-year year)) 128 m 7 (<= m (hebrew-calendar-last-month-of-year year))
129 (hebrew-calendar-last-day-of-month m year)) 129 (hebrew-calendar-last-day-of-month m year))
130 (calendar-sum 130 (calendar-sum
131 m 1 (< m month) 131 m 1 (< m month)
132 (hebrew-calendar-last-day-of-month m year))) 132 (hebrew-calendar-last-day-of-month m year)))
133 ;; Else add days in prior months this year 133 ;; Else add days in prior months this year.
134 (calendar-sum 134 (calendar-sum
135 m 7 (< m month) 135 m 7 (< m month)
136 (hebrew-calendar-last-day-of-month m year))) 136 (hebrew-calendar-last-day-of-month m year)))
137 (hebrew-calendar-elapsed-days year);; Days in prior years. 137 (hebrew-calendar-elapsed-days year) ; days in prior years
138 -1373429))) ;; Days elapsed before absolute date 1. 138 -1373429))) ; days elapsed before absolute date 1
139 139
140(defun calendar-hebrew-from-absolute (date) 140(defun calendar-hebrew-from-absolute (date)
141 "Compute the Hebrew date (month day year) corresponding to absolute DATE. 141 "Compute the Hebrew date (month day year) corresponding to absolute DATE.
@@ -200,19 +200,19 @@ Driven by the variable `calendar-date-display-form'."
200 (= death-day 30) 200 (= death-day 30)
201 (not (hebrew-calendar-long-heshvan-p (1+ death-year)))) 201 (not (hebrew-calendar-long-heshvan-p (1+ death-year))))
202 (1- (calendar-absolute-from-hebrew (list 9 1 year)))) 202 (1- (calendar-absolute-from-hebrew (list 9 1 year))))
203 ;; If it's Kislev 30 it depends on the first anniversary; if 203 ;; If it's Kislev 30 it depends on the first anniversary; if that
204 ;; that was not Kislev 30, use the day before Teveth 1. 204 ;; was not Kislev 30, use the day before Teveth 1.
205 ((and (= death-month 9) 205 ((and (= death-month 9)
206 (= death-day 30) 206 (= death-day 30)
207 (hebrew-calendar-short-kislev-p (1+ death-year))) 207 (hebrew-calendar-short-kislev-p (1+ death-year)))
208 (1- (calendar-absolute-from-hebrew (list 10 1 year)))) 208 (1- (calendar-absolute-from-hebrew (list 10 1 year))))
209 ;; If it's Adar II, use the same day in last month of 209 ;; If it's Adar II, use the same day in last month of year (Adar
210 ;; year (Adar or Adar II). 210 ;; or Adar II).
211 ((= death-month 13) 211 ((= death-month 13)
212 (calendar-absolute-from-hebrew 212 (calendar-absolute-from-hebrew
213 (list (hebrew-calendar-last-month-of-year year) death-day year))) 213 (list (hebrew-calendar-last-month-of-year year) death-day year)))
214 ;; If it's the 30th in Adar I and year is not a leap year 214 ;; If it's the 30th in Adar I and year is not a leap year (so
215 ;; (so Adar has only 29 days), use the last day in Shevat. 215 ;; Adar has only 29 days), use the last day in Shevat.
216 ((and (= death-day 30) 216 ((and (= death-day 30)
217 (= death-month 12) 217 (= death-month 12)
218 (not (hebrew-calendar-leap-year-p year))) 218 (not (hebrew-calendar-leap-year-p year)))
@@ -272,8 +272,9 @@ Driven by the variable `calendar-date-display-form'."
272If MONTH, DAY (Hebrew) is visible, the value returned is corresponding 272If MONTH, DAY (Hebrew) is visible, the value returned is corresponding
273Gregorian date in the form of the list (((month day year) STRING)). Returns 273Gregorian date in the form of the list (((month day year) STRING)). Returns
274nil if it is not visible in the current calendar window." 274nil if it is not visible in the current calendar window."
275 (if (memq displayed-month;; This test is only to speed things up a bit; 275 ;; This test is only to speed things up a bit; it works fine without it.
276 (list ;; it works fine without the test too. 276 (if (memq displayed-month
277 (list
277 (if (< 11 month) (- month 11) (+ month 1)) 278 (if (< 11 month) (- month 11) (+ month 1))
278 (if (< 10 month) (- month 10) (+ month 2)) 279 (if (< 10 month) (- month 10) (+ month 2))
279 (if (< 9 month) (- month 9) (+ month 3)) 280 (if (< 9 month) (- month 9) (+ month 3))
@@ -308,7 +309,7 @@ nil if it is not visible in the current calendar window."
308 "List of dates related to Rosh Hashanah, as visible in calendar window." 309 "List of dates related to Rosh Hashanah, as visible in calendar window."
309 (if (or (< displayed-month 8) 310 (if (or (< displayed-month 8)
310 (> displayed-month 11)) 311 (> displayed-month 11))
311 nil;; None of the dates is visible 312 nil ; none of the dates is visible
312 (let* ((abs-r-h (calendar-absolute-from-hebrew 313 (let* ((abs-r-h (calendar-absolute-from-hebrew
313 (list 7 1 (+ displayed-year 3761)))) 314 (list 7 1 (+ displayed-year 3761))))
314 (mandatory 315 (mandatory
@@ -365,41 +366,42 @@ nil if it is not visible in the current calendar window."
365 366
366(defun holiday-hanukkah () 367(defun holiday-hanukkah ()
367 "List of dates related to Hanukkah, as visible in calendar window." 368 "List of dates related to Hanukkah, as visible in calendar window."
368 (if (memq displayed-month;; This test is only to speed things up a bit; 369 ;; This test is only to speed things up a bit, it works fine without it.
369 '(10 11 12 1 2));; it works fine without the test too. 370 (if (memq displayed-month
370 (let ((m displayed-month) 371 '(10 11 12 1 2))
371 (y displayed-year)) 372 (let ((m displayed-month)
372 (increment-calendar-month m y 1) 373 (y displayed-year))
373 (let* ((h-y (extract-calendar-year 374 (increment-calendar-month m y 1)
374 (calendar-hebrew-from-absolute 375 (let* ((h-y (extract-calendar-year
375 (calendar-absolute-from-gregorian 376 (calendar-hebrew-from-absolute
376 (list m (calendar-last-day-of-month m y) y))))) 377 (calendar-absolute-from-gregorian
377 (abs-h (calendar-absolute-from-hebrew (list 9 25 h-y)))) 378 (list m (calendar-last-day-of-month m y) y)))))
378 (holiday-filter-visible-calendar 379 (abs-h (calendar-absolute-from-hebrew (list 9 25 h-y))))
379 (list 380 (holiday-filter-visible-calendar
380 (list (calendar-gregorian-from-absolute (1- abs-h)) 381 (list
381 "Erev Hanukkah") 382 (list (calendar-gregorian-from-absolute (1- abs-h))
382 (list (calendar-gregorian-from-absolute abs-h) 383 "Erev Hanukkah")
383 "Hanukkah (first day)") 384 (list (calendar-gregorian-from-absolute abs-h)
384 (list (calendar-gregorian-from-absolute (1+ abs-h)) 385 "Hanukkah (first day)")
385 "Hanukkah (second day)") 386 (list (calendar-gregorian-from-absolute (1+ abs-h))
386 (list (calendar-gregorian-from-absolute (+ abs-h 2)) 387 "Hanukkah (second day)")
387 "Hanukkah (third day)") 388 (list (calendar-gregorian-from-absolute (+ abs-h 2))
388 (list (calendar-gregorian-from-absolute (+ abs-h 3)) 389 "Hanukkah (third day)")
389 "Hanukkah (fourth day)") 390 (list (calendar-gregorian-from-absolute (+ abs-h 3))
390 (list (calendar-gregorian-from-absolute (+ abs-h 4)) 391 "Hanukkah (fourth day)")
391 "Hanukkah (fifth day)") 392 (list (calendar-gregorian-from-absolute (+ abs-h 4))
392 (list (calendar-gregorian-from-absolute (+ abs-h 5)) 393 "Hanukkah (fifth day)")
393 "Hanukkah (sixth day)") 394 (list (calendar-gregorian-from-absolute (+ abs-h 5))
394 (list (calendar-gregorian-from-absolute (+ abs-h 6)) 395 "Hanukkah (sixth day)")
395 "Hanukkah (seventh day)") 396 (list (calendar-gregorian-from-absolute (+ abs-h 6))
396 (list (calendar-gregorian-from-absolute (+ abs-h 7)) 397 "Hanukkah (seventh day)")
397 "Hanukkah (eighth day)"))))))) 398 (list (calendar-gregorian-from-absolute (+ abs-h 7))
399 "Hanukkah (eighth day)")))))))
398 400
399(defun holiday-passover-etc () 401(defun holiday-passover-etc ()
400 "List of dates related to Passover, as visible in calendar window." 402 "List of dates related to Passover, as visible in calendar window."
401 (if (< 7 displayed-month) 403 (if (< 7 displayed-month)
402 nil;; None of the dates is visible 404 nil ; none of the dates is visible
403 (let* ((abs-p (calendar-absolute-from-hebrew 405 (let* ((abs-p (calendar-absolute-from-hebrew
404 (list 1 15 (+ displayed-year 3760)))) 406 (list 1 15 (+ displayed-year 3760))))
405 (mandatory 407 (mandatory
@@ -484,7 +486,7 @@ nil if it is not visible in the current calendar window."
484 "List of dates around Tisha B'Av, as visible in calendar window." 486 "List of dates around Tisha B'Av, as visible in calendar window."
485 (if (or (< displayed-month 5) 487 (if (or (< displayed-month 5)
486 (> displayed-month 9)) 488 (> displayed-month 9))
487 nil;; None of the dates is visible 489 nil ; none of the dates is visible
488 (let* ((abs-t-a (calendar-absolute-from-hebrew 490 (let* ((abs-t-a (calendar-absolute-from-hebrew
489 (list 5 9 (+ displayed-year 3760))))) 491 (list 5 9 (+ displayed-year 3760)))))
490 492
@@ -568,10 +570,10 @@ not be marked in the calendar. This function is provided for use with the
568 (if (and (or (char-equal (preceding-char) ?\^M) 570 (if (and (or (char-equal (preceding-char) ?\^M)
569 (char-equal (preceding-char) ?\n)) 571 (char-equal (preceding-char) ?\n))
570 (not (looking-at " \\|\^I"))) 572 (not (looking-at " \\|\^I")))
571 ;; Diary entry that consists only of date. 573 ;; Diary entry that consists only of date.
572 (backward-char 1) 574 (backward-char 1)
573 ;; Found a nonempty diary entry--make it visible and 575 ;; Found a nonempty diary entry--make it visible and
574 ;; add it to the list. 576 ;; add it to the list.
575 (let ((entry-start (point)) 577 (let ((entry-start (point))
576 (date-start)) 578 (date-start))
577 (re-search-backward "\^M\\|\n\\|\\`") 579 (re-search-backward "\^M\\|\n\\|\\`")
@@ -608,8 +610,10 @@ A value of 0 in any position is a wildcard."
608 (if (calendar-date-is-visible-p date) 610 (if (calendar-date-is-visible-p date)
609 (mark-visible-calendar-date date))) 611 (mark-visible-calendar-date date)))
610 ;; Month and day in any year--this taken from the holiday stuff. 612 ;; Month and day in any year--this taken from the holiday stuff.
611 (if (memq displayed-month;; This test is only to speed things up a 613 ;; This test is only to speed things up a bit, it works
612 (list ;; bit; it works fine without the test too. 614 ;; fine without it.
615 (if (memq displayed-month
616 (list
613 (if (< 11 month) (- month 11) (+ month 1)) 617 (if (< 11 month) (- month 11) (+ month 1))
614 (if (< 10 month) (- month 10) (+ month 2)) 618 (if (< 10 month) (- month 10) (+ month 2))
615 (if (< 9 month) (- month 9) (+ month 3)) 619 (if (< 9 month) (- month 9) (+ month 3))
@@ -690,7 +694,7 @@ is provided for use as part of the nongregorian-diary-marking-hook."
690 (let* 694 (let*
691 ((date-form (if (equal (car (car d)) 'backup) 695 ((date-form (if (equal (car (car d)) 'backup)
692 (cdr (car d)) 696 (cdr (car d))
693 (car d)));; ignore 'backup directive 697 (car d))) ; ignore 'backup directive
694 (dayname (diary-name-pattern calendar-day-name-array 698 (dayname (diary-name-pattern calendar-day-name-array
695 calendar-day-abbrev-array)) 699 calendar-day-abbrev-array))
696 (monthname 700 (monthname
@@ -998,14 +1002,14 @@ use when highlighting the day in the calendar."
998 (if (= h-day 30) 1002 (if (= h-day 30)
999 (format 1003 (format
1000 "%s (first day)" 1004 "%s (first day)"
1001 ;; next month must be in the same year since this 1005 ;; Next month must be in the same year since this
1002 ;; month can't be the last month of the year since 1006 ;; month can't be the last month of the year since
1003 ;; it has 30 days 1007 ;; it has 30 days
1004 (aref h-month-names h-month)) 1008 (aref h-month-names h-month))
1005 (if (= h-yesterday 30) 1009 (if (= h-yesterday 30)
1006 (format "%s (second day)" this-month) 1010 (format "%s (second day)" this-month)
1007 this-month)))) 1011 this-month))))
1008 (if (= (% d 7) 6) ;; Saturday--check for Shabbat Mevarchim 1012 (if (= (% d 7) 6) ; Saturday--check for Shabbat Mevarchim
1009 (cons mark 1013 (cons mark
1010 (cond ((and (> h-day 22) (/= h-month 6) (= 29 last-day)) 1014 (cond ((and (> h-day 22) (/= h-month 6) (= 29 last-day))
1011 (format "Mevarchim Rosh Hodesh %s (%s)" 1015 (format "Mevarchim Rosh Hodesh %s (%s)"
@@ -1046,7 +1050,7 @@ use when highlighting the day in the calendar."
1046 1050
1047(defun hebrew-calendar-parasha-name (p) 1051(defun hebrew-calendar-parasha-name (p)
1048 "Name(s) corresponding to parasha P." 1052 "Name(s) corresponding to parasha P."
1049 (if (arrayp p);; combined parasha 1053 (if (arrayp p) ; combined parasha
1050 (format "%s/%s" 1054 (format "%s/%s"
1051 (aref hebrew-calendar-parashiot-names (aref p 0)) 1055 (aref hebrew-calendar-parashiot-names (aref p 0))
1052 (aref hebrew-calendar-parashiot-names (aref p 1))) 1056 (aref hebrew-calendar-parashiot-names (aref p 1)))
@@ -1058,7 +1062,7 @@ use when highlighting the day in the calendar."
1058An optional parameter MARK specifies a face or single-character string to 1062An optional parameter MARK specifies a face or single-character string to
1059use when highlighting the day in the calendar." 1063use when highlighting the day in the calendar."
1060 (let ((d (calendar-absolute-from-gregorian date))) 1064 (let ((d (calendar-absolute-from-gregorian date)))
1061 (if (= (% d 7) 6) ;; Saturday 1065 (if (= (% d 7) 6) ; Saturday
1062 (let* 1066 (let*
1063 ((h-year (extract-calendar-year 1067 ((h-year (extract-calendar-year
1064 (calendar-hebrew-from-absolute d))) 1068 (calendar-hebrew-from-absolute d)))
@@ -1077,28 +1081,30 @@ use when highlighting the day in the calendar."
1077 (t "regular"))) 1081 (t "regular")))
1078 (year-format 1082 (year-format
1079 (symbol-value 1083 (symbol-value
1080 (intern (format "hebrew-calendar-year-%s-%s-%s" ;; keviah 1084 (intern (format "hebrew-calendar-year-%s-%s-%s" ; keviah
1081 rosh-hashanah-day type passover-day)))) 1085 rosh-hashanah-day type passover-day))))
1082 (first-saturday ;; of Hebrew year 1086 (first-saturday ; of Hebrew year
1083 (calendar-dayname-on-or-before 6 (+ 6 rosh-hashanah))) 1087 (calendar-dayname-on-or-before 6 (+ 6 rosh-hashanah)))
1084 (saturday ;; which Saturday of the Hebrew year 1088 (saturday ; which Saturday of the Hebrew year
1085 (/ (- d first-saturday) 7)) 1089 (/ (- d first-saturday) 7))
1086 (parasha (aref year-format saturday))) 1090 (parasha (aref year-format saturday)))
1087 (if parasha 1091 (if parasha
1088 (cons mark 1092 (cons mark
1089 (format 1093 (format
1090 "Parashat %s" 1094 "Parashat %s"
1091 (if (listp parasha) ;; Israel differs from diaspora 1095 (if (listp parasha) ; Israel differs from diaspora
1092 (if (car parasha) 1096 (if (car parasha)
1093 (format "%s (diaspora), %s (Israel)" 1097 (format "%s (diaspora), %s (Israel)"
1094 (hebrew-calendar-parasha-name (car parasha)) 1098 (hebrew-calendar-parasha-name
1095 (hebrew-calendar-parasha-name (cdr parasha))) 1099 (car parasha))
1100 (hebrew-calendar-parasha-name
1101 (cdr parasha)))
1096 (format "%s (Israel)" 1102 (format "%s (Israel)"
1097 (hebrew-calendar-parasha-name (cdr parasha)))) 1103 (hebrew-calendar-parasha-name
1104 (cdr parasha))))
1098 (hebrew-calendar-parasha-name parasha))))))))) 1105 (hebrew-calendar-parasha-name parasha)))))))))
1099 1106
1100;; The seven ordinary year types (keviot) 1107;; The seven ordinary year types (keviot).
1101
1102(defconst hebrew-calendar-year-Saturday-incomplete-Sunday 1108(defconst hebrew-calendar-year-Saturday-incomplete-Sunday
1103 [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 1109 [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22]
1104 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] 1110 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42]
@@ -1156,8 +1162,7 @@ Kislev has 30 days), and has Passover start on Saturday.")
1156Hebrew year that starts on Thursday, is `complete' (Heshvan and Kislev each 1162Hebrew year that starts on Thursday, is `complete' (Heshvan and Kislev each
1157have 30 days), and has Passover start on Sunday.") 1163have 30 days), and has Passover start on Sunday.")
1158 1164
1159;; The seven leap year types (keviot) 1165;; The seven leap year types (keviot).
1160
1161(defconst hebrew-calendar-year-Saturday-incomplete-Tuesday 1166(defconst hebrew-calendar-year-Saturday-incomplete-Tuesday
1162 [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1167 [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
1163 23 24 25 26 27 nil 28 29 30 31 32 33 34 35 36 37 38 39 40 [41 42] 1168 23 24 25 26 27 nil 28 29 30 31 32 33 34 35 36 37 38 39 40 [41 42]