[HOME] [datelab]

About the yeartypes and their distribution
===============================================
(C) 1999-04-24, Magnus Bodin <magnus@bodin.org>

TABLE a. The definition of "yeartype"
=====================================
Along the gregorian epoch there is 14 different yeartypes. 14 different years 
in respect to what weekdays all given dates are. The yeartype is determined 
by two factors. What weekday the year starts with (seven different) and if the
year is a leapyear or not. Therefore the number of different yeartypes is 14.

Our definition of yeartype is a numeric representation of what weekday
January 1st is and if the year is a leapyear or not. Like this:

+-------------+-------------------------------------------+
|  weekday of |                                           |
|  January  1 | Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su |
+-------------+-------------------------------------------+
|year is leap?|                       Y  Y  Y  Y  Y  Y  Y |
+-------------+-------------------------------------------+
|  yeartype   |  0  1  2  3  4  5  6  7  8  9 10 11 12 13 |
+-------------+-------------------------------------------+

More about day distribution with full tables


TABLE b. Yeartypes along an entire gregorian epoch, in sequence
===============================================================

1804: 13, 1, 2, 3, 11, 6, 0, 1, 9, 4, 5, 6, 7, 2, 3, 4, 12, 0, 1, 2, 10, 5, 6, 0, 8, 3, 4, 5, 
1832: 13, 1, 2, 3, 11, 6, 0, 1, 9, 4, 5, 6, 7, 2, 3, 4, 12, 0, 1, 2, 10, 5, 6, 0, 8, 3, 4, 5, 
1860: 13, 1, 2, 3, 11, 6, 0, 1, 9, 4, 5, 6, 7, 2, 3, 4, 12, 0, 1, 2, 10, 5, 6, 0, 8, 3, 4, 5, 
1888: 13, 1, 2, 3, 11, 6, 0, 1, 9, 4, 5, 6, 

1900:  0, 1, 2, 3, 11, 6, 0, 1, 9, 4, 5, 6, 7, 2, 3, 4, 12, 0, 1, 2, 10, 5, 6, 0, 8, 3, 4, 5, 
1928: 13, 1, 2, 3, 11, 6, 0, 1, 9, 4, 5, 6, 7, 2, 3, 4, 12, 0, 1, 2, 10, 5, 6, 0, 8, 3, 4, 5, 
1956: 13, 1, 2, 3, 11, 6, 0, 1, 9, 4, 5, 6, 7, 2, 3, 4, 12, 0, 1, 2, 10, 5, 6, 0, 8, 3, 4, 5, 
1984: 13, 1, 2, 3, 11, 6, 0, 1, 9, 4, 5, 6, 7, 2, 3, 4, 12, 0, 1, 2, 10, 5, 6, 0, 8, 3, 4, 5, 
2012: 13, 1, 2, 3, 11, 6, 0, 1, 9, 4, 5, 6, 7, 2, 3, 4, 12, 0, 1, 2, 10, 5, 6, 0, 8, 3, 4, 5, 
2040: 13, 1, 2, 3, 11, 6, 0, 1, 9, 4, 5, 6, 7, 2, 3, 4, 12, 0, 1, 2, 10, 5, 6, 0, 8, 3, 4, 5, 
2068: 13, 1, 2, 3, 11, 6, 0, 1, 9, 4, 5, 6, 7, 2, 3, 4, 12, 0, 1, 2, 10, 5, 6, 0, 8, 3, 4, 5, 
2096: 13, 1, 2, 3, 4,                                                    5, 6, 0, 8, 3, 4, 5, 
2108: 13, 1, 2, 3, 11, 6, 0, 1, 9, 4, 5, 6, 7, 2, 3, 4, 12, 0, 1, 2, 10, 5, 6, 0, 8, 3, 4, 5, 
2136: 13, 1, 2, 3, 11, 6, 0, 1, 9, 4, 5, 6, 7, 2, 3, 4, 12, 0, 1, 2, 10, 5, 6, 0, 8, 3, 4, 5, 
2164: 13, 1, 2, 3, 11, 6, 0, 1, 9, 4, 5, 6, 7, 2, 3, 4, 12, 0, 1, 2, 10, 5, 6, 0, 8, 3, 4, 5, 	  

2192: 13, 1, 2, 3, 11, 6, 0, 1,                2, 3, 4,                                    5
	  
TABLE c. Yeartypes, and their distribution
==========================================

+----+-------+-------+-------+-------+-------------------------+
|type| Jan 1 |  Leap | n/400 |   %   | Halloween is a saturday |
+----+-------+-------+-------+-------+-------------------------+
|  0 |  Mon  |       |   43  | 10.75 |                         |
|  1 |  Tue  |       |   44  | 11.00 |                         |
|  2 |  Wed  |       |   43  | 10.75 |                         |
|  3 |  Thu  |       |   44  | 11.00 | Halloween is a saturday |
|  4 |  Fri  |       |   43  | 10.75 |                         |
|  5 |  Sat  |       |   43  | 10.75 |                         |
|  6 |  Sun  |       |   43  | 10.75 |                         |
|  7 |  Mon  |   X   |   13  |  3.25 |                         | 
|  8 |  Tue  |   X   |   14  |  3.5  |                         |
|  9 |  Wed  |   X   |   14  |  3.5  | Halloween is a saturday |
| 10 |  Thu  |   X   |   13  |  3.25 |                         |
| 11 |  Fri  |   X   |   15  |  3.75 |                         |
| 12 |  Sat  |   X   |   13  |  3.25 |                         |
| 13 |  Sun  |   X   |   15  |  3.75 |                         |
+----+-------+-------+-------+-------+-------------------------+

(Note: 13.5% of all Halloween is falling on a saturday, which
 is slightly less than 1/7, 14.3% i.e if it was evenly distributed)