Perpetual Calendar
Auteur
Senan Sekhon
Last Updated
il y a 4 ans
License
Creative Commons CC BY 4.0
Résumé
A cut-out template for a circular calendar that can be used indefinitely.
A cut-out template for a circular calendar that can be used indefinitely.
\documentclass[10pt]{extarticle}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[a4paper,top=0.5in,bottom=0.2in,left=0.5in,right=0.5in,footskip=0.3in,includefoot]{geometry}
\usepackage{tikz,tkz-euclide}
\definecolor{leapcol}{HTML}{2408CC} %color for leap years
\definecolor{mtcol}{HTML}{14A820} %color for month calendar
\definecolor{suncol}{HTML}{D32209} %color for Sunday
\definecolor{col0}{HTML}{D0E732} %color for century 0 (years 000-099)
\definecolor{col1}{HTML}{2E96E1} %color for century 1 (years 100-199)
\definecolor{col2}{HTML}{33CD47} %color for century 2 (years 200-299)
\definecolor{col3}{HTML}{D218B7} %color for century 3 (years 300-399)
\newcommand{\lp}[1]{\textcolor{leapcol}{#1}} %leap year coloring
\def\ra{6} %inner radius of days of week
\def\rb{8} %outer radius of days of week
\def\rc{10} %inner radius of years
\def\rd{16} %outer radius of years
\def\rab{{(\ra+\rb)/2}}
\def\rcd{{(\rc+\rd)/2}}
\newcommand{\pin}{%Cross mark in the center of each wheel to indicate where to put the pin
\draw[-,thick] (-0.5,0)--(0.5,0);
\draw[-,thick] (0,-0.5)--(0,0.5);
\fill (0,0) circle (2mm);
}
%%%NOTE ON LEAP YEARS:
%In the Gregorian calendar, a leap year is a year that is either (a multiple of 4 but NOT a multiple of 100) or (a multiple of 400). This yields 97 leap years every 400 years. The total number of days in 400 years is thus 365*400+97=146097, which is a multiple of 7 (20871*7=146097). Thus the calendar repeats itself with a 400-year cycle, hence the need for 400 years on the back wheel.
%Designed by Senan Sekhon, February 12, 2021
\begin{document}
\begin{center}
{\fontsize{32}{36}\sffamily\bfseries\selectfont Back Wheel}
\vspace{10mm}
\begin{tikzpicture}[scale=0.5,transform shape]
\foreach \a in {0,1,2,3} %Color-coding the centuries
\fill[col\a!20] (90*\a:\rc) arc(90*\a:{90*(\a+1)}:\rc) -- ({90*(\a+1)}:\rd) arc({90*(\a+1)}:90*\a:\rd) -- cycle;
\foreach \r in {\ra,\rb,\rc}%Main inner circles
\draw[-] (0,0) circle (\r);
\draw[-,very thick] (0,0) circle (\rd); %Outer circle
\foreach \i in {0,1,...,27}
\draw[-] ({90/7*\i}:\ra)--({90/7*\i}:\rb) ({90/7*\i}:\rc)--({90/7*\i}:\rd); %Spokes on the back wheel
\foreach \i/\label in {%Positions of years (leap years individually marked)
%%%Century 0 (sections 0-13)
0/{\lp{000}\\006\\017\\023\\\lp{028}\\034\\045},
1/{051\\\lp{056}\\062\\073\\079\\\lp{084}\\090},
2/{001\\007\\\lp{012}\\018\\029\\035\\\lp{040}\\046},
3/{057\\063\\\lp{068}\\074\\085\\091\\\lp{096}},
4/{002\\013\\019\\\lp{024}\\030\\041\\047},
5/{\lp{052}\\058\\069\\075\\\lp{080}\\086\\097},
6/{003\\\lp{008}\\014\\025\\031\\\lp{036}\\042\\053},
7/{059\\\lp{064}\\070\\081\\087\\\lp{092}\\098},
8/{009\\015\\\lp{020}\\026\\037\\043\\\lp{048}},
9/{054\\065\\071\\\lp{076}\\082\\093\\099},
10/{\lp{004}\\010\\021\\027\\\lp{032}\\038\\049},
11/{055\\\lp{060}\\066\\077\\083\\\lp{088}\\094},
12/{005\\011\\\lp{016}\\022\\033\\039\\\lp{044}},
13/{050\\061\\067\\\lp{072}\\078\\089\\095},
%%%Century 1 (sections 14-27)
14/{102\\113\\119\\\lp{124}\\130\\141\\147},
15/{\lp{152}\\158\\169\\175\\\lp{180}\\186\\197},
16/{103\\\lp{108}\\114\\125\\131\\\lp{136}\\142\\153},
17/{159\\\lp{164}\\170\\181\\187\\\lp{192}\\198},
18/{109\\115\\\lp{120}\\126\\137\\143\\\lp{148}},
19/{154\\165\\171\\\lp{176}\\182\\193\\199},
20/{\lp{104}\\110\\121\\127\\\lp{132}\\138\\149},
21/{155\\\lp{160}\\166\\177\\183\\\lp{188}\\194},
22/{105\\111\\\lp{116}\\122\\133\\139\\\lp{144}},
23/{150\\161\\167\\\lp{172}\\178\\189\\195},
24/{100\\106\\117\\123\\\lp{128}\\134\\145},
25/{151\\\lp{156}\\162\\173\\179\\\lp{184}\\190},
26/{101\\107\\\lp{112}\\118\\129\\135\\\lp{140}\\146},
27/{157\\163\\\lp{168}\\174\\185\\191\\\lp{196}},
%%%Century 2 (sections 28-41)
28/{209\\215\\\lp{220}\\226\\237\\243\\\lp{248}},
29/{254\\265\\271\\\lp{276}\\282\\293\\299},
30/{\lp{204}\\210\\221\\227\\\lp{232}\\238\\249},
31/{255\\\lp{260}\\266\\277\\283\\\lp{288}\\294},
32/{205\\211\\\lp{216}\\222\\233\\239\\\lp{244}},
33/{250\\261\\267\\\lp{272}\\278\\289\\295},
34/{200\\206\\217\\223\\\lp{228}\\234\\245},
35/{251\\\lp{256}\\262\\273\\279\\\lp{284}\\290},
36/{201\\207\\\lp{212}\\218\\229\\235\\\lp{240}\\246},
37/{257\\263\\\lp{268}\\274\\285\\291\\\lp{296}},
38/{202\\213\\219\\\lp{224}\\230\\241\\247},
39/{\lp{252}\\258\\269\\275\\\lp{280}\\286\\297},
40/{203\\\lp{208}\\214\\225\\231\\\lp{236}\\242\\253},
41/{259\\\lp{264}\\270\\281\\287\\\lp{292}\\298},
%%%Century 3 (sections 42-55)
42/{305\\311\\\lp{316}\\322\\333\\339\\\lp{344}},
43/{350\\361\\367\\\lp{372}\\378\\389\\395},
44/{300\\306\\317\\323\\\lp{328}\\334\\345},
45/{351\\\lp{356}\\362\\373\\379\\\lp{384}\\390},
46/{301\\307\\\lp{312}\\318\\329\\335\\\lp{340}\\346},
47/{357\\363\\\lp{368}\\374\\385\\391\\\lp{396}},
48/{302\\313\\319\\\lp{324}\\330\\341\\347},
49/{\lp{352}\\358\\369\\375\\\lp{380}\\386\\397},
50/{303\\\lp{308}\\314\\325\\331\\\lp{336}\\342\\353},
51/{359\\\lp{364}\\370\\381\\387\\\lp{392}\\398},
52/{309\\315\\\lp{320}\\326\\337\\343\\\lp{348}},
53/{354\\365\\371\\\lp{376}\\382\\393\\399},
54/{\lp{304}\\310\\321\\327\\\lp{332}\\338\\349},
55/{355\\\lp{360}\\366\\377\\383\\\lp{388}\\394}}
\node[align=center,rotate={90/7*(floor(\i/2)-(\i/2-floor(\i/2))+3/4)-90},color=black,font=\fontsize{20}{20}\sffamily\selectfont] at ({90/7*(floor(\i/2)-(\i/2-floor(\i/2))+3/4)}:\rcd) {\label};
\foreach \i/\day in {%Positions of days of week
0/{\textcolor{suncol}{SUN}},1/MON,2/TUE,3/WED,4/THU,5/FRI,6/SAT}
\foreach \j in {0,7,14,21}
\node[rotate={90/7*(\i-\j+1/2)+90},color=black,font=\fontsize{28}{28}\sffamily\selectfont] at ({90/7*(\i-\j+1/2)}:\rab) {\scalebox{0.6}[1.0]{\day}}; %Days of week
\pin
\end{tikzpicture}
\end{center}
\vfill
\setlength{\fboxsep}{5pt}
\setlength{\fboxrule}{2pt}
\begin{center}
\color{red!80!black}\fbox{
\begin{minipage}{48em}\fontsize{16}{18}\bfseries\selectfont\centering
Do NOT print this document double-sided!\\
Each page must be printed on a separate sheet of paper.
\end{minipage}}
\end{center}
\newpage
\begin{center}
{\fontsize{32}{36}\sffamily\bfseries\selectfont Front Wheel}
\vspace{20mm}
\begin{tikzpicture}[scale=0.5,transform shape]
\draw[-,very thick] (45:\rd) arc(45:-225:\rd) -- (135:\rc) arc(135:45:\rc) --cycle;
\filldraw[gray!30,draw=mtcol,very thick] (-45:\rb) arc(-45:-135:\rb) -- (-135:\ra) arc(-135:-45:\ra)--cycle;
\path[postaction={decoration={text along path,text format delimiters={|}{|},text={|\small\bfseries|CUT OUT THIS PIECE},raise=-1mm,text align=center},decorate}] (-135:\rab) arc (-135:-45:\rab);
\foreach \i in {1,2,3,4,5,6}
\draw[-] ({-90/7*\i+135}:\rc)--({-90/7*\i+135}:{\rc-0.4});
\foreach \df in {45,135}
\draw[-] (\df:\rc)--(\df:{\rc-2});
\foreach \k/\ms in {%Positions of months
0/{MAY},
1/{\lp{FEB}\\AUG},
2/{FEB\\MAR\\NOV},
3/{JUN},
4/{SEP\\DEC},
5/{\lp{JAN}\\APR\\JUL},
6/{JAN\\OCT}}
\node[align=center,rotate={90/7*(-\k-1/2)+45},font=\fontsize{18}{20}\sffamily\bfseries\selectfont] at ({90/7*(-\k-
1/2)+135}:{\rc-1.2}) {\ms}; %Months
\foreach \p/\q in {%Positions of monthly calendar
0/{1\\8\\15\\22\\29},1/{2\\9\\16\\23\\30},2/{3\\10\\17\\24\\31},3/{4\\11\\18\\25},4/{5\\12\\19\\26},5/{6\\13\\20\\27},6/{7\\14\\21\\28}}
\node[below,align=center,rotate={90/7*(\p+1/2)-45},color=mtcol,font=\fontsize{24}{28}\sffamily\selectfont] at ({90/7*(\p+1/2)-135}:{\rb+0.4}) {\q}; %Monthly calendar
\foreach \dg in {-135,-45}
\draw[-,color=mtcol] (\dg:\rb)--(\dg:\rb+5);
\path[postaction={decoration={text along path,text format delimiters={|}{|},text={|\color{mtcol}\Large\bfseries|WEEK},raise=-1cm,text align=center},decorate}] (-135:\ra-2.5) arc (-135:-45:\ra-2.5);
\node[align=center,font=\fontsize{36}{42}\sffamily\bfseries\selectfont] at (90:3) {Perpetual Calendar};
\node[align=center,text width=8cm,font=\fontsize{24}{30}\sffamily\selectfont] at (175:\rc+1) {Years are listed up to multiples of 400, e.g.\\for 1976, use 376\\for 2025, use 025};
\node[align=center,text width=8cm,font=\fontsize{24}{30}\sffamily\selectfont] at (5:\rc+1) {Turn the wheel to align the year and month.\\For \lp{leap years}, use the \lp{blue} months};
\node[align=center,font=\fontsize{24}{28}\sffamily\selectfont] at (-90:2) {Designed by Senan Sekhon};
\pin
\end{tikzpicture}
\end{center}
\vfill
\begin{center}
\fbox{\begin{minipage}{48em}
{\fontsize{18}{18}\sffamily\bfseries\selectfont Instructions}
\begin{enumerate}\setlength{\itemsep}{0pt}
\item Cut along the \textbf{bold} lines (including the window on the front wheel labeled ``CUT OUT THIS PIECE'').
\item Push a split pin through the center of each wheel, with the front wheel on top, and secure it in place.
\end{enumerate}
To find the day of the week of a given date, rotate the front wheel until the year lines up with the month. A calendar for that month will appear at the bottom of the front wheel.
\end{minipage}}
\end{center}
\end{document}