%%{init: {'theme': 'default', 'themeVariables': { 'fontSize': '32px'}}}%%
flowchart LR
A[Dec]-->B[date]-->C[time]-->D[snap]-->E[span]
click A "/dec"
click B "/dec/date"
click C "/dec/time"
click D "/dec/snap"
click E "/dec/span"
Diagram 1
Decalendar
My website serves as a demonstration of both the Quarto publishing📤system and the Dec measurement📐system. I use several clever hacks to get Quarto to display all of the dates on my website in the Dec year+day format. Knowing the basics of the Dec calendar🗓️(Decalendar) will help you to understand the filter and include articles in the Quarto section of my site.
Among its many features, Quarto offers support for the Observable data visualization system. Observable is my top choice for interactive graphics. We can interact with the two Observable calendar plots below⬇️using the adjacent Observable inputs. The scrubber🧽input is a great place to start because it cycles🔄through every value of the range🎚️inputs beneath it.
0 Day of year (doy)
To activate the scrubber input, press the “Play”▶️button above⬆️the range inputs. Upon activation, the box around the selected day in each plot will move back and forth between the first “day of year” (doy), d0, and the last doy, which is either d364 or d365. To insert or remove d365, use the “Year length” radio📻input to set the number of days in the year.
The insertion of d365 shifts 306 dates, d to d, in the Gregorian calendar by 1 day, but does not change the order of any Dec dates, because d365 is the last day of any Dec leap year and is always followed by d0 of the subsequent Dec year (y+1). The “Year length” radio input also changes the value of the negative “Day of year” range input by 1 day.
Similarly, the “Coordinated Universal Time (UTC) offset” radio input shifts the Gregorian calendar date selected by the “Month” and “Day of month” range inputs by 1 day. The “UTC offset” radio input will also shift the Decalendar plot cell colors🎨by 1 day if the “Color scheme” radio input is set to the “Month” discrete scheme instead of the “Day” continuous scheme.
From the perspective of Dec, month color labels🏷️are only useful if we want to compare the Dec and Gregorian calendars. In contrast, Dec day color labels can help us sort days into groups of 100 called hectodays (h) and groups of 10 named xún (x). Dec defines meterological seasons in terms of h and uses x instead of Gregorian calendar months and weeks.
The “Plot layout” radio input rotates the calendar plots by a quarter turn, interchanging the horizontal (↔︎) and vertical (↕) axes. The axis labels demonstrate that x and “days of xún” (dox) are analogous to weeks and “days of week” (dow). If we multiply an x axis label by ten and add it to a dox axis label, we get a “positive integer doy” (pid) cell value: × 10 + = .
There are two range inputs labelled “Day of year” because every doy can be expressed as either a positive or a negative integer. The pid is the number of days that have passed in the year, the absolute value of the “negative integer doy” (nid) is the number of days left in the year, and their difference is the “Decalendar year length” (dyl), which can be 365 or 366.
The distinction between pid and nid can be explained in terms of computer programming. If we think of a year as an array and each day as an array element, dyl is the number of elements in the array, pid is a positive index, and nid is a negative index. Array indexes can be used to obtain specific array elements individually via indexing or in groups via array slicing.
The year+day Dec date format is short for year+day/dyl. Dec truncates dates because the dyl is not needed to specify a date, remains constant for 366, 1095, or 2920 days, has only 2 possible values: 365 or 366, and can be determined by passing Year y to Equation 3 below. Nevertheless, we can use the dyl to convert between different kinds of Dec dates.
Dec categorizes each date as a countdown or countup date, depending on whether the date counts up the days since Year y or counts down the days until Year y+1. The current year+day UTC date, +, informs us that Year began days ago, whereas its countdown equivalent, -, lets us know that Year will begin in days.
Both pid and nid can be useful. If we wanted to add 285 days to the doy selected below, for example to predict when a pregnant🤰woman will give birth to a baby👩🍼(Jukic et al. 2013+215), we should add 285 to the pid if it is less than 80 in a common year or less than 81 in a leap year, but otherwise we should add 1 to the year and add 285 to the nid: + 285 = .
Inputs.bind(Inputs.range([0,364+ leapInput], {step:1,label:"Day of year"}), viewof dotyInput)
Inputs.bind(Inputs.range([-365- leapInput,-1], {step:1,label:"Day of year"}), viewof dotyInput1)
The radio input beneath the plots selects the dow for d, the first day of the Gregorian calendar year. Changing the ddow shifts every Gregorian calendar date by one to six days without affecting Decalendar. A leap year that begins on the last dow, Dow 6, has an extra “week of year” (woy), but its first and last woy, Weeks 0 and 53, have only one day.
Although weeks determine the shape of the Gregorian calendar plot, its cell values are “days of month” (dom). We can uniquely identify🪪a specific day in any year with a pid, instead of a month and a dom. Except for d365 in leap years, every year has the same x, h, and months, but not the same weeks, because the ddow varies from year to year.
1 Day of xún (dox)
In contrast to a week, an x can be split evenly into either five pairs of days or two equal halves called “pentadays of xún” (pox). Likewise, a common year can be divided evenly into 73 “pentadays” (p). The last p of a leap year, p73, consists of the final day of the leap year, d365, and the first four days of the subsequent year: Days 0 to 3.
In the context of a common year, p73 is synonymous with p0 of the subsequent year. To obtain the current p, we double the current x and add the current pox, which is 1 if the current dox is greater than 4 and 0 otherwise: = × 2 + [ > 4]. If we divide a dox by 5, the remainder will be its corresponding “day of pentaday” (dop): mod 5 = .
In Diagram 2 below, each row is a pox and each square node is a dox. Diagram 2 visualizes Schedule L, a Dec schedule that plans for exactly 219 work days per year, which is close to the 208 to 210 work days per year provisioned by a four-day workweek. Schedule L designates Dox 1, 2, 3, 6, 7, and 8 as work days and Dox 0, 4, 5, and 9 as rest days.
Schedule L (Dox 0 to 9)
%%{init: {'theme': 'default', 'themeVariables': { 'fontSize': '29px'}}}%%
flowchart LR
B~~~M[ ]:::empty----N[ ]:::empty
W---M
N---O[ ]:::empty
Q[ ]:::empty---L
W[ ]:::empty-->A[0]-->B[1]-->C[2]-->D[3]-->E[4]---L[ ]:::empty
Y[ ]:::empty-->F[5]-->G[6]-->H[7]-->I[8]-->J[9]---O[ ]:::empty
B~~~P[ ]:::empty---Q
Y---P
subgraph workdays[work]
B
C
G
H
D
I
end
subgraph restdays[ ]
A
F
E
J
workdays
end
classDef empty width:0px;
Diagram 2
Dec identifies groups of days between Dop 0 and 4 and betwixt Dox 0 and 9 as “pentaday interquintile ranges” (pir) and “xún interdecile ranges” (xir), respectively. The acronyms pir and xir are derived from the terms quintile, decile, and interquartile range. If we follow Schedule L, a pir is to a workweek as a p is to a week and as a x is to a fortnight.
The pair of days between two pir is called a “liminal interconnecting margin” (lim). The last lim of a common year, Lim 73, comprises Days 364 and 0 and is synonymous with Lim 0 of the subsequent year. In a leap year, Lim 73 consists of Days 364 and 365 and overlaps with Lim 74, which is composed of Days 365 and 0 and is equivalent to Lim 0 of the succeeding year.
Except for Lim 74, every even-numbered lim is the border that separates two xir. With the exception of Lim 73, every odd-numbered lim is flanked by the two pir within each xir. Diagram 3 below shows the last 5 doy of a common year and the first 5 doy of the following year, which include the last day of Lim 72, Pir 72, Lim 0, Pir 0, and the first day of Lim 1.
Schedule L (p72 and p0)
%%{init: {'theme': 'default', 'themeVariables': { 'fontSize': '29px'}}}%%
flowchart LR
W~~~~O[ ]:::empty
W[ ]:::empty-->A[360]-->B[361]-->C[362]-->D[363]-->E[364]----L[ ]:::empty
Y[ ]:::empty-->F[0]-->G[1]-->H[2]-->I[3]-->J[4]-->K[ ]:::empty
Q[ ]:::empty---L
Y---Q
subgraph workdays[work]
B
C
G
H
D
I
end
subgraph restdays[ ]
A
F
E
J
workdays
end
classDef empty width:0px;
Diagram 3
The diagrams above illustrate that the transition from a common year preserves the alternating pattern of two-day lim and three-day pir. After 4 or 8 years, this pattern is interrupted by Lim 73 and 74 at the end of a leap year. In Diagram 4 below, this interruption manifests as an extra doy per row which puts Day 364 alongside Day 365 and Day 4 beside Day 5.
Schedule L (d360 to d365 and d0 to d5)
%%{init: {'theme': 'default', 'themeVariables': { 'fontSize': '29px'}}}%%
flowchart LR
W~~~~O[ ]:::empty
W[ ]:::empty-->A[360]-->B[361]-->C[362]-->D[363]-->E[364]-->L[365]----S[ ]:::empty
Y[ ]:::empty-->F[0]-->G[1]-->H[2]-->I[3]-->J[4]-->K[5]-->T[ ]:::empty
Q[ ]:::empty---S
Y---Q
subgraph workdays[work]
B
C
G
H
D
I
end
subgraph restdays[ ]
A
F
E
J
K
L
workdays
end
classDef empty width:0px;
Diagram 4
According to Schedule L, pir only contain workdays and lim are solely made up of rest days. When we follow Schedule L, a lim is the Dec analog of a weekend. To make lim appear like weekends we can start from Dox 1 instead of Dox 0 as in the Diagram 5 below, which displays its lim as a two-by-two square grid on the right like Lim 73 and 1 in Diagram 4 above.
Schedule L (Dox 1 to 0)
%%{init: {'theme': 'default', 'themeVariables': { 'fontSize': '29px'}}}%%
flowchart LR
B~~~M[ ]:::empty----N[ ]:::empty
W---M
N---O[ ]:::empty
Q[ ]:::empty---L
W[ ]:::empty-->A[1]-->B[2]-->C[3]-->D[4]-->E[5]---L[ ]:::empty
Y[ ]:::empty-->F[6]-->G[7]-->H[8]-->I[9]-->J[0]---O[ ]:::empty
B~~~P[ ]:::empty---Q
Y---P
subgraph workdays[work]
A
B
C
F
G
H
end
subgraph restdays[ ]
D
E
I
J
workdays
end
classDef empty width:0px;
Diagram 5
The order of dox in Diagram 5 is different than all of the previous diagrams but all of the diagrams above show Schedule L because the categorization of dox as work or rest days remains unchanged. If we left rotate (↺) the dox categories of Schedule L by 1 day, we get the Schedule X Dec schedule: L ↺ 1 = X. Schedule X groups rest days at the end of each p.
Schedule X (Dox 0 to 9)
%%{init: {'theme': 'default', 'themeVariables': { 'fontSize': '29px'}}}%%
flowchart LR
B~~~M[ ]:::empty----N[ ]:::empty
W---M
N---O[ ]:::empty
Q[ ]:::empty---L
W[ ]:::empty-->A[0]-->B[1]-->C[2]-->D[3]-->E[4]---L[ ]:::empty
Y[ ]:::empty-->F[5]-->G[6]-->H[7]-->I[8]-->J[9]---O[ ]:::empty
B~~~P[ ]:::empty---Q
Y---P
subgraph workdays[work]
A
B
C
F
G
H
end
subgraph restdays[ ]
D
E
I
J
workdays
end
classDef empty width:0px;
Diagram 6
If we follow Schedule X, there will be 4 consecutive work days during any transition from a leap year. To limit the number of consecutive work days to 3, we could right rotate (↻) Schedule L and obtain Schedule F: L ↻ 1 = F. Unlike Schedule X, Schedule F handles yearly transitions just as gracefully as Schedule L and provisions the exact same number of work days per year.
Schedule F (Dox 0 to 9)
%%{init: {'theme': 'default', 'themeVariables': { 'fontSize': '29px'}}}%%
flowchart LR
M[ ]:::empty----N[ ]:::empty
W---M
N---O[ ]:::empty
Q[ ]:::empty---L
W[ ]:::empty-->A[0]-->B[1]-->C[2]-->D[3]-->E[4]---L[ ]:::empty
Y[ ]:::empty-->F[5]-->G[6]-->H[7]-->I[8]-->J[9]---O[ ]:::empty
P[ ]:::empty---Q
Y---P
subgraph workdays[work]
C
D
E
H
I
J
end
subgraph restdays[ ]
A
B
F
G
workdays
end
classDef empty width:0px;
Diagram 7
Each of the 32 base Dec schedules can be expressed as a 5-bit binary (base2) sequence. Of these 32 binary sequences, 8 are palindromes. If a Dec schedule can be represented by a 5-bit palindrome, we can identify its work and rest days by the last digit of not only the pid but also either the subsequent nid (nid) in common years or the nid after next (nid) in leap years.
To get the nid, we sum the nid and one: nid = nid + 1. Similarly, the nid is the sum of the nid and two: nid = nid + 2. Table 1 below displays the pid, nid, and nid of the first and final 11 days of a common year. We can convert any nid into a “mixed integer doy” (mid) and then use the last digit of the mid to discern between the work and rest days of any of the 32 base Dec schedules in common years.
The horizontal line above all but the last digit of the mid in Table 1 is called a vinculum. In Dec, a vinculum negates whatever is beneath it. Negating all of the digits of an integer flips its sign. Negative integers can be denoted by vinculum instead of a minus sign. For example, d1 and d19 are two equivalent ways to write Day -1, the last day of the Decalendar year.
pid
nid
nid
mid
0
-365
-364
375
1
-364
-363
376
2
-363
-362
377
3
-362
-361
378
4
-361
-360
379
5
-360
-359
360
6
-359
-358
361
7
-358
-357
362
8
-357
-356
363
9
-356
-355
364
10
-355
-354
365
…
…
…
…
354
-11
-10
29
355
-10
-9
10
356
-9
-8
11
357
-8
-7
12
358
-7
-6
13
359
-6
-5
14
360
-5
-4
15
361
-4
-3
16
362
-3
-2
17
363
-2
-1
18
364
-1
-0
19
pid
nid
nid
mid
pid
nid
nid
mid
0
-365
-364
375
354
-11
-10
29
1
-364
-363
376
355
-10
-9
10
2
-363
-362
377
356
-9
-8
11
3
-362
-361
378
357
-8
-7
12
4
-361
-360
379
358
-7
-6
13
5
-360
-359
360
359
-6
-5
14
6
-359
-358
361
360
-5
-4
15
7
-358
-357
362
361
-4
-3
16
8
-357
-356
363
362
-3
-2
17
9
-356
-355
364
363
-2
-1
18
10
-355
-354
365
364
-1
-0
19
Table 1
The correlation between a digit and the absolute value (magnitude) of its mixed integer is positive for positive digits and negative for negative digits. Each negative digit in the mid column of Table 1 pulls the magnitude of its mid towards one, meanwhile each positive digit in that column moves the magnitude of its mid in the opposite direction along the number line.
In a common year, the last digits of pid and nid run antiparallel to each other like complementary strands of deoxyribonucleic acid🧬, but instead of adenine to thymine and cytosine to guanine, the pattern is 0 to 4, 1 to 3, 2 to 2, 3 to 1, 4 to 0, and so on. The final digits of pid and nid follow the same pattern in leap years: 0 to 4, 1 to 3, 2 to 2, 3 to 1, 4 to 0, and so on.
The last digits of pid and mid are misaligned by 4 days in leap years and by 5 days in common years. Dec maintains a constant 5-day misalignment by replacing the mid with the next mid (mid) in leap years. The accents above nid and mid both advance the apparent doy by one day. Table 2 below shows the pid, nid, nid, and mid of the first and last 11 days of a leap year.
pid
nid
nid
mid
0
-366
-364
375
1
-365
-363
376
2
-364
-362
377
3
-363
-361
378
4
-362
-360
379
5
-361
-369
360
6
-360
-358
361
7
-359
-357
362
8
-358
-356
363
9
-357
-355
364
10
-356
-354
365
…
…
…
…
355
-11
-9
10
356
-10
-8
11
357
-9
-7
12
358
-8
-6
13
359
-7
-5
14
360
-6
-4
15
361
-5
-3
16
362
-4
-2
17
363
-3
-1
18
364
-2
-0
19
365
-1
-0
00
pid
nid
nid
mid
pid
nid
nid
mid
0
-366
-364
375
354
-11
-9
10
1
-365
-363
376
355
-10
-8
11
2
-364
-362
377
356
-9
-7
12
3
-363
-361
378
357
-8
-6
13
4
-362
-360
379
358
-7
-5
14
5
-361
-369
360
359
-6
-4
15
6
-360
-358
361
360
-5
-3
16
7
-359
-357
362
361
-4
-2
17
8
-358
-356
363
362
-3
-1
18
9
-357
-355
364
363
-2
-0
19
10
-356
-354
365
364
-1
-0
00
Table 2
The Schedule L rule for categorization of work and rest days can be summarized as [doymod 5 ∈ {1,2,3}], where ∈ means “is an element of” and {1,2,3} is Set L, a set which contains all of the dop that are work days according to Schedule L. The doy in the Schedule L rule can be the mid or nid in common years, the mid or nid in leap years, or the pid in all years.
Base32
The Schedule L pattern of rest and work days can be expressed in binary (base2) as 01110, decimal (base10) as 14, or Dec duotrigesimal (base32) as L. Each of the 32 Dec base schedules can be represented by a single letter of the Dec base32 (b32) alphabet. The b32 letters are listed in Table 3 below alongside their base10 (b10) and base2 (b2) values.
A
0
00000
N
16
10000
Á
1
00001
O
17
10001
B
2
00010
Ó
18
10010
C
3
00011
P
19
10011
D
4
00100
Q
20
10100
E
5
00101
R
21
10101
É
6
00110
S
22
10110
F
7
00111
T
23
10111
G
8
01000
U
24
11000
H
9
01001
Ú
25
11001
I
10
01010
V
26
11010
Í
11
01011
W
27
11011
J
12
01100
X
28
11100
K
13
01101
Y
29
11101
L
14
01110
Ý
30
11110
M
15
01111
Z
31
11111
A
0
00000
G
8
01000
N
16
10000
U
24
11000
Á
1
00001
H
9
01001
O
17
10001
Ú
25
11001
B
2
00010
I
10
01010
Ó
18
10010
V
26
11010
C
3
00011
Í
11
01011
P
19
10011
W
27
11011
D
4
00100
J
12
01100
Q
20
10100
X
28
11100
E
5
00101
K
13
01101
R
21
10101
Y
29
11101
É
6
00110
L
14
01110
S
22
10110
Ý
30
11110
F
7
00111
M
15
01111
T
23
10111
Z
31
11111
Table 3
Table 3 above shows that the b32 alphabet includes the 26 letters of the English alphabet and combines the 6 vowels, a, e, i, o, u, and y, with acute accents ( ́) to create 6 additional letters, á, é, í, ó, ú, and ý, for a total of 32 letters. The 6 additional accented letters are included immediately after their unaccented antecedents as per the order of the English alphabet.
If we need more work days than those provided by Schedule L, we can switch to the Schedule LM Dec schedule by following Schedule L on even numbered p and Schedule M to odd numbered p. Schedule LM has 1 more work day than Schedule L and provisions 255 work days per year without modifying the yearly transition shown in the Diagrams 3 and 4 above.
Unlike weekly schedules, Dec schedules like Schedules L and LM provide a consistent🎯number of work days every year. While Days 364, 365, and 0 can be work or rest days in the Gregorian calendar️, these days are always rest days if we follow Schedules L or LM. Therefore, Schedules L and LM do not require any holidays to smooth the transition between years.
There are 11 United States (US) Federal holidays. US Federal holidays that fall on a Gregorian calendar️ rest day, Dow 0 or Dow 6, are observed on the nearest Gregorian calendar️ work day: Dow 1 or Dow 5. Instead of applying this rule to Schedule L and moving holidays from Dox 0 to 1, 4 to 3, 5 to 6, or 9 to 8, we can switch between Dec schedules as needed.
The last US Federal holiday of the Gregorian calendar year is Christmas🎄. Even though it occurs on d299, which is the last day of Hectoday 2 (h2), Christmas is likely to be celebrated on d300, the first day of Hectoday 3 (h3), by people who do not use Dec and live in a UTC time zone with a negative offset. The Dec analog of the holiday season is Hectoday -1 (h1).
2 Day of hectoday (doh)
In addition to the four astronomical seasons, there are four Dec seasons which were chosen from two overlapping sets of four consecutive h to match daily global mean temperature patterns. The two sets called are “positive integer hectodays” (pih) and “negative integer hectodays” (nih). Equation 8 organizes doy into one of the four pih: h0, h1, h2, or h3.
Similarly, Equation 9 groups doy into one of the four nih: h1, h2, h3, or h4. In either case, the pid or nid of a doy is divided by 100 and then floored to discard the fractional part of the quotient. In the line plot below, the four Dec seasons, h0, h1, h2, and h1, are labelled red, yellow, cyan, and violet, respectively, but h2 is truncated to remove its overlap with h1.
{// Common properties on the axes and annotationsconst axisCommon = {tickSize:10,fontSize:18,fill:"#333" };const gridY = {// We'll also use these properties for the ticks' vector lines on the y-axisstroke:"#c0c0c0",strokeOpacity:0.7,strokeDasharray:"2,2" };const annotCommon = { fontSize:16,fontWeight:700,pointerEvents:"none" };const hideAnnotCommon = {...annotCommon,px:"dayOfYear",py:"temp",strokeWidth:5,maxRadius:5 };// Highlight line marks on hoverconst pointerInactive =renderFilter(true);const pointerContext =renderFilter(false);const pointerFocus =renderFilter(false);// I prefer to create a standalone color scale to access the range's values// (e.g., color.range[0]) and avoid the hassle of repeatedly copying hex codesconst color = Plot.scale({color: {type:"categorical",domain: [2023,2024,2025],range: ["#ffc500","#00f9f6","#ff09ff"],unknown:"#808080" } });const plot = Plot.plot({// Dimensionswidth:Math.min(width,640),marginTop:0,marginRight:10,marginBottom:45,marginLeft:45,// Scalesy: {domain: [11,17.5] },color: color,// Other top-level optionsaxis:null,label:null,style: {overflow:"visible" },// Marksmarks: [ Plot.ruleX([100,200,264], {stroke: ["#cdff00","#00bdff","#4800ff"],strokeWidth:4,strokeDasharray:"2 2",}), Plot.ruleX([100,200,264], {stroke: (d, i) => i ===2?"#ddd":"#555",strokeWidth:4,strokeDasharray:"2 2",strokeDashoffset:2}), Plot.areaY(d3.range(366), {x: d => d,y1:11,y2:17.5,fill: d => d <264?piecewiseColor(Math.floor(d /100) /4) :"#4800ff",fillOpacity:0.1}),// X-axis// The textAnchor option is not a channel so we'll use two axisX marks Plot.axisX({...axisCommon,// Days of year that correspond to// ['Jan 1', 'Apr 1', 'Jul 1', 'Oct 1']// and ['Jan 1', 'Mar 1', 'May 1', 'Jul 1', 'Sep 1', 'Nov 1']ticks: [0,50,100,150,200,250,300,350],stroke:"#333",label:"Day of year",labelAnchor:"center",labelOffset:42, }),// Use different textAnchor for the last tick// Y-axis// Y-axis gridlines Plot.gridY({...gridY,ticks: d3.range(12,18) }),// Again, two axisY marks because neither textAnchor nor dx are channels Plot.axisY({...axisCommon,...gridY,ticks: d3.range(12,18),tickFormat:"d",strokeDashoffset:2,textAnchor:"end",label:"Daily global mean temperatures",labelAnchor:"center",labelOffset:40,tickPadding:1,dx:8, }),// Line marks Plot.line( temps,pointerInactive({x:"dayOfYear",y:"temp",stroke:"year",strokeWidth: (d) => (d.year===2025?3: d.year===2024?3: d.year===2023?3:1),strokeOpacity: (d) => ([2023,2024,2025].includes(d.year) ?0.7:0.08) }) ), Plot.line( temps,pointerContext({x:"dayOfYear",y:"temp",z:"year",stroke: color.unknown,strokeWidth:1,strokeOpacity:0.1 }) ), Plot.line( temps,pointerFocus({x:"dayOfYear",y:"temp",stroke:"year",strokeWidth:2 }) ),// Annotations Plot.text(["2025"], {...annotCommon,x: () => (width <400?302:320),y:14.5,fill: color.range[2],stroke:"black",strokeWidth:.5, }),// Trick to hide the "2024" annotation on hover// Plot.text(// temps,// Plot.pointer({// ...hideAnnotCommon,// text: (d) => "2025",// x: () => (width < 400 ? 302 : 320),// y: 14.5// })// ), Plot.text(["2024"], {...annotCommon,x: () => (width <380?45:70),y:16.5,fill: color.range[1],stroke:"black",strokeWidth:.5, }),// Trick to hide the "2024" annotation on hover// Plot.text(// temps,// Plot.pointer({// ...hideAnnotCommon,// text: (d) => "2024",// x: () => (width < 380 ? 45 : 85),// y: 16.5// })// ), Plot.text(["2023"], {...annotCommon,x: () => (width <380?230: width <480?210:230),y:16.5,fill: color.range[0],stroke:"black",strokeWidth:.5, }),// Hide the "2023" annotation on hover// Plot.text(// temps,// Plot.pointer({// ...hideAnnotCommon,// text: (d) => "2023",// x: () => (width < 380 ? 230 : width < 480 ? 210 : 205),// y: 16.5// })// ),// Plot.text(["Years 1940 to 2025"], {// ...annotCommon,// x: () => (width < 380 ? 110 : 170),// y: 12.4,// // Different font weight than other annotations// fontWeight: 400// }),// Hide the "Years 1940 to 2022" annotation on hover// Plot.text(// temps,// Plot.pointer({// ...hideAnnotCommon,// text: (d) => "Years 1940 to 2022",// x: () => (width < 380 ? 110 : 170),// y: 12.4// })// ),// On hover marks// Trick to hide x-axis when hovering Plot.ruleY( temps, Plot.pointer({px:"dayOfYear",py:"temp",x1:0,x2:366,y:10.8,stroke:"white",className:"hideXaxisRule",strokeWidth:30,inset:-25,maxRadius:5 }) ),// Rule mark Plot.ruleX( temps, Plot.pointer({x:"dayOfYear",py:"temp",stroke:"#333",insetTop:15,insetBottom:-10,maxRadius:5 }) ),// Dot mark Plot.dot( temps, Plot.pointer({x:"dayOfYear",y:"temp",fill:"year",r:4,maxRadius:5 }) ),// Text on datapoint (tooltip) Plot.text( temps, Plot.pointer({x:"dayOfYear",y:"temp",fill:"currentColor",text: (d) =>`${d.year}\n${d3.format(".1f")(d.temp)}`,fontSize:16,lineHeight:1.1,strokeWidth:5,dy:-30,maxRadius:5 }) ),// Hovered day on x-axis Plot.text( temps, Plot.pointer({...axisCommon,x:"dayOfYear",py:"temp",text: (d) =>"Day "+ d.dayOfYear,frameAnchor:"bottom",dy:22,className:"focusedDayAndTemp",maxRadius:5 }) ) ] }); plot.addEventListener("input", () => {if (plot.value===null) { pointerInactive.update(true); pointerContext.update(false); pointerFocus.update(false); } else {const year = plot.value.year; pointerInactive.update(false); pointerContext.update((d) => d.year!== year); pointerFocus.update((d) => d.year=== year); } });return plot;}
The line plot shows how well the four Dec season match ERA5 daily global mean temperatures. If we think of the method for assigning doy to Dec seasons in Equation 10 as a statistical model, its “goodness of fit” is evidenced by the fact that the hottest doy on average, d149, is near the middle of h1 and the coldest doy on average, d316, is close to the center of h1.
In general, the hottest days are in h1, the coldest days are in h1, temperatures increase with time in h0, and temperatures decrease with time in h2. Therefore, we can refer to h0, h1, h2, and h1 as the rise📈, crest🔥, fall📉, and trough❄️, respectively, of global mean temperatures. Table 4 below shows the Dec season names in the Northern and SouthernHemispheres.
Hemisphere
h0
h1
h2
h1
Northern
Spring
Summer
Autumn
Winter
Southern
Autumn
Winter
Spring
Summer
Table 4
The remainder after dividing a doy is a “day of hectoday” (doh), which essentially is the percent of a pih that has passed if the dividend is a pid, the percent of a nih that remains if the dividend is a nid, the percent of a pih that is left if the dividend is a mid that is equal to a pid, or the percent of a nih that has passed if the dividend is a mid which is equal to a nid.
To highlight an h and doh, we can use a three digit mid with a vinculum over either the first digit or the last two digits. If its vinculum is above only its first digit, the current three-digit mid is equal to the the current nid and signals that h is % done: mid = nih. If its vinculum is over its last two digits, the current three-digit mid is equal to the current pid and indicates that h is % unfinished: mid = pid.
We can also use mid to draw attention to the current x. If its vinculum is above its first two digit, the current mid is equal to the the current nid and signals that h is % done: mid = nih. If its vinculum is over only its last digit, the current mid is equal to the current pid and indicates that h is % unfinished: mid = pid.
The connection between pid and seasonal temperature changes requires pid to reset after d1. If we do not need to visually keep track of years, h, doh, months, dom, x, dox, weeks, dow, p, or dop, we can translate a a Dec year+day date into a single integer called a “day of era” (doe).
Every doy belongs to one pih, one nih, one “positive integer xun” (pix), and one “negative integer xun” (nix). In total, that is two h and two x per doy.
3 Day of era (doe)
Dec refers to midnight on d0 as the “beginning of year” (boy). At the boy, the pidrolls over from 364 or 365 to 0. If the nid did not reset to -365 or -366 at the boy, it would continue from -1 to 0 and thus become a pid. The doe is like a nid that became a pid at the “beginning of era” (boe), midnight on d0 of Year 0 (y0), and never restarted before or after the boe.
Each of the ten Dec time zones has its own boe, doe, boy, and doy. The boe of the Zone 0 Dec time zone is called the Dec epoch. We can convert Julian day numbers (JDN) to Zone 0 doe by subtracting the number of full days in between the start of the Julian period and the Dec epoch, which is 1721119 if the Zone 0 time is later than noon and 1721120 otherwise.
Dec uses doe for calendrical calculations, such as finding the POSIXzero-based dow of a given date. This year, the dow of Christmas🎄is according to Equation 12: ( + )mod 7 = . Unlike dow, the dox can be found without much effort, because it is the last digit of the pid or equivalently the remainder after dividing the pid by 10 as per Equation 13.
Equation 12 is derived from Howard Hinnant’s weekday_from_days algorithm. The Dec epoch dow is 3 = (0 + 3) mod 7. The UNIX epochdow is 4 = (719468 + 3) mod 7. Depending on how mod is defined, a negative doe could yield a negative dow: -1 = (-60 + 3) mod 7. We can add 7 to a negative dow in the bottom row of Table 5 to turn it into the positive dow above it.
Sun
Mon
Tue
Wed
Thu
Fri
Sat
+
0
1
2
3
4
5
6
-
7
6
5
4
3
2
1
Table 5
Christmas is an anchored⚓️holiday because it occurs on the same pid every year. In contrast, floating🛟holidays like Thanksgiving🦃are always planned for the same dow and thus can fall on various pid. We can use Equation 14, which is inspired by Howard Hinnant’s weekday_difference algorithm, to find the floating holiday date associated with a given year.
In Equation 14, dowM is the minuend, dowS is the subtrahend, and dowΔ is the difference between them that ranges from 0 to 6. To get the pid of the first Dow4 after d266, which is Thanksgiving in the United States🇺🇸and Brazil🇧🇷, we plug 4 as dowM and the dow of d267 as dowS into Equation 14, = (4 - + 7) mod 7, and then add 267: = + 267.
WarningBad Pun Alert
Deckaday the halls with dows of holly! Fa + la × 8! ’Tis the hectoday to be jolly! Aren’t you thankful that I couldn’t thank of a Thanksgiving pun?
4 Year of era (yoe)
Almost all of the equations above depend on the pid. Most often, the pid is calculated using Equations 15, 16, and 18, which are based on the days_from_civil algorithm created by Howard Hinnant and described in his manuscript entitled chrono-Compatible Low-Level Date Algorithms(2021+185), to convert the two components of a Dec date, namely a “year of era” (yoe) and a pid, into a doe.
The Dec date equations are the inverse🔁of the Dec doe equations above, based on Howard Hinnant’s civil_from_days algorithm, and useful for obtaining Dec dates from doe, UNIX timestamps, and JDN. Along the way to obtaining a yoe and pid from a doe, the Dec date equations calculate the “cycle of era” (coe), “year of cycle” (yoc), and “day of cycle” (doc).
Dates generated by the Dec date equations are guaranteed to be in the standard yoe+pid format. Therefore, we can standardize Dec dates by using the Dec doe and date equations consecutively to perform a round-trip “date to doe to date” conversion and thus ensure that the yoe is an integer and the pid is a positive integer less than the dyl: 0 ≤ pid < dyl.
5 Day of week (dow)
Even though Decalendar functions best with x, Dec dates can display dow by splitting a pid into a “beginning of week” (bow) and the POSIX zero-based dow. To obtain the bow, we subtract the dow from the pid: bow = pid-dow. According to the current Zone 0yoe+bow+dow date, , the most recent Dow0 was on d and today is Dow.
A Dec bow date can have a countup or a countdown bow. The countdown equivalent of is -. Like nid, countdown bow can be useful for calculations. We can add up to 52 weeks to any countdown bow without having to take into account the length of the year. The sum of 52 weeks and the last bow+dow of this year is 52 × 7 + + = + .
Based on the calculation above, the Dec bow date that is 52 weeks after -+ is ++. When we see the same dow in two dates, we know that difference between them is a multiple of 7. The bow can be used to refer to the current week in phrases like “the week of d” or “the week that begins with d” and thus can function like a woy.
6 Week of year (woy)
We can convert between the bow+dow in Dec bow dates and the 7×woy+dow-boydow in Dec woy dates. The boydow is the dow of the first day of the Dec year. To obtain the current woy, we sum the boydow with the current bow and then divide by 7: = ( + ) ÷ 7. Dec truncates woy dates so that they only display the yoe, woy, and dow: ++.
If dow were like doy and reset at the boy, the boydow would always be zero and conversion between woy and bow dates would be straightforward but the reality is that we need the boydow to convert a woy date to a bow date. Dec pads the left side of the woy and bow in dates with zeros so that we can distinguish between two-digit woy and three-digit bow.
To find the boydow, we first divide the bow by 7 and subtract the remainder from 7. Then, we divide the resulting difference by 7 and keep the remainder. We could also get the boydow without a bow by turning the yoe into a doe and then the doe into a dow. Dec woy dates obfuscate🫣doy much more than bow dates, but may be useful for week-based accounting🧾.
Dec dates can be expanded to display Dec month and POSIX dom numbers. The current Dec dom date is . Dec month numbers are the last doy of the previous month because POSIX dom are one-based. For zero-based dom, Dec represents each month with its first doy: . This way, Dec can support both zero- and one-based dom.
Dec dom dates replace the doy d from Dec dates with d-m+m. We evaluate the subtraction to get d-m, the Dec month number, but not the addition, so we can see m, the dom. If we combine the dom and dow patterns above, we can create hybrid dom+dow Dec dates: , where is d-m-w, the doy of the last Dow 0 before the beginning of the month.
We can obtain Dec month numbers using only a pair of hands🤲by counting index☝️and ring💍fingers as 30 days and other fingers as 31 days. For zero-based dom, we start counting from 0. For one-based dom, we start counting from -1, as shown in the image below. To spread 12 months across 10 fingers, the first and last fingers each represent 2 months.
The finger🖐mnemonic described above is similar to the knuckle👊and musical keyboard🎹mnemonics. These mnemonics attempt to make sense of the irregular pattern of month lengths in the Gregorian calendar️. As opposed to months, we do not need mnemonics, tables, or mental calculations to use x, because all of the required information is plainly visible in the doy.
8 Month of year (moy)
To convert doy to or from POSIX month and dom numbers, we can use the month of year (moy) equations from the civil_from_days and days_from_civil algorithms. Unlike POSIX month numbers, moy are zero-based and start from Moy 0 instead of Moy 10. As shown in the first moy equation below, we can obtain a moy from a doy or a POSIX month number.
A moy and its equivalent POSIX month number differ by 9 in Moy 10 or 11 and -3 in any other moy because the Dec epoch, 0000+000, is 2 months later than the Gregorian calendar epoch: -0001+306. To convert years, we add 1 to the yoe and subtract 1 from the Gregorian calendar️ common era year (cey) if the doy is greater than 305, the moy is greater than 9, or the month is less than 3:
This article describes Dec and how it can interoperate with the Gregorian calendar by minuend expanding Dec dates into dom and dow dates or dividend expanding dow dates into woy dates. On its own, Dec minuend expands dates into span equivalents, but has no use for dividend expansion, because doy display x and dox without any expansion.
Diagram 8 below visualizes the conversion of the UNIX epoch Dec date 1969+306 into a Gregorian calendar️year, month, dom and dow. To obtain its associated dow, we first need to convert a Dec date into a doe. Outside of its interoperability with the Gregorian calendar️, Dec converts dates into doe to find the number of days in between two dates.
%%{init: {'theme': 'default', 'themeVariables': { 'fontSize': '20px'}}}%%
flowchart LR
L~~~Y
L-->Y
L-->D
L-->E
R-->Y
M---R[ ]:::empty
D---A
D~~~B[ ]:::empty
A-->G
G---R
Y~~~L[ ]:::empty
Y---A[ ]:::empty
Y~~~A
B-->M
B~~~N
B-->N
B-->D
B~~~D
N~~~B
E-->W
subgraph decdate[Decalendar]
Y[yoe<br>1969]
D[doy<br>306]
E[doe<br>719468]
end
subgraph gregdate[Gregorian calendar]
W[dow<br>4]
G[year<br>1970]
M[month<br>1]
N[dom<br>1]
end
classDef empty width:0px;
click E "#doe"
click W "#dow"
click Y "#yoe"
click D "#doy"
click G "#eya"
click M "#moy"
click N "#dom"
Diagram 8
For simplicity, the flowchart above does not show conversion byproducts, such as the coe, yoc, and doc generated during Dec doe to date conversion or the moy that we need in order to split a doy into a month and a dom or combine a month and a dom into a doy. The arrows in the flowchart represent equations adapted from chrono-Compatible Low-Level Date Algorithms.
Instead of converting Dec dates, we can expand them to view the information we need as part of the math-inspired notation of Dec. At its heart❤️, Dec is a simple system that uses only years and days for time measurement. Thanks to Dec expansion, Dec can work with other units. In this way, Dec expansion bridges the gap between the Dec and Gregorian calendars.
Next
After reading this article, you should be able to understand the examples in my filter, include, and script articles, but you may want to start with my Quarto article. To see the full extent of the benefits that Dec provides, I recommend that you continue through the Dec section of my site to the [time](/dec/time, [snap](/dec/snap, and span🌈articles. Dec has a lot more to offer than just dates!
%%{init: {'theme': 'default', 'themeVariables': { 'fontSize': '32px'}}}%%
flowchart LR
A[Dec]-->B[date]-->C[time]-->D[snap]-->E[span]
Z[ ]:::empty~~~F[Quarto]-->G[filter]-->H[include]
classDef empty width:0px;
click A "/dec"
click B "/dec/date"
click C "/dec/time"
click D "/dec/snap"
click E "/dec/span"
click F "/quarto"
click G "/quarto/filter"
click H "/quarto/include"
Diagram 9
In addition my Dec and Quarto articles, many other articles on my site discuss Dec. Notably, my Jupyter article compares the code underlying Dec in several programming languages, my Reveal article features a presentation on Dec time measurement, and my Observable article describes how I demonstrate Dec in action with interactive and animated visualizations.
Thank you for your interest in Dec. You will find citation information for this article below. Please note that the original source of the algorithms underlying the conversion of Dec year+day dates and doe is Hinnant, Howard. 2021+184. “chrono-Compatible Low-Level Date Algorithms.” .https://howardhinnant.github.io/date_algorithms.html.
Quarto configuration files, such as _quarto.yml and _metadata.yml, are written in yaml. Quarto input files, including Quarto markdown, Jupyter notebook, markdown, and specially formatted script files, can start with a yaml header. Therefore, we could put the metadata above directly into a Quarto configuration or input file rather than into a bibliography file.
As an alternative to yaml, I suggest the BibTeX format. The BibTeX bibliography file below can be used by Quarto equally as well as the yaml bibliography file above. Regardless of the bibliography file format we choose, Quarto configuration and input files require that we store the path to our bibliography file, or our list of bibliography file paths, in yaml format.
In addition to storing metadata in a bibliography file, we can keep instructions regarding how to style citations and references in a Citation Style Language (csl) file. If we do not provide a csl file, Quarto will follow the Chicago Manual of Style when processing parenthetical citations: (Hinnant 2021+185), narrative citations: (2021+185), and references:
When provided with nature.csl, american-medical-association.csl, or a similar csl file, Quarto will produce superscript numeric citations, which look just like Quarto footnotes: 1. Unlike Quarto citations, Quarto footnotes do not require any additional files or configuration. A Quarto output file can have both a Footnotes and References section.
Glossary
a: arcbeat, a hundred thousandth of a circle, 0.0036 degrees, 0.216 arcminutes, 12.96 arcseconds
b: beat, centimilliday, a hundred thousandth of an day, 864 milliseconds
mb: millibeat, centimicroday, a thousandth of a beat, a hundred millionth of a day, 864 microseconds
bpc: a musical or heart beat per centiday, a tenth of a beat per milliday, 0.0694 beats per minute, 100 beats per day
bpm: a musical or heart beat per milliday, ten beats per centiday, 0.694 beats per minute, 1000 beats per day
bmi: body mass index, kilograins of body mass divided by height in zem squared (kg/z²)
c: taur, 𝜏r, 100000 kilozem, 40000 kilometers, nearly the circumference of the Earth, roughly the product of 𝜏 and the radius of the Earth, approximately the dividend of the surface area and the diameter of the Earth
mc: millitaur, m𝜏r, a thousandth of a taur, 100 kilozem, 40 kilometers
nc: nanotaur, n𝜏r, a thousandth of a taur, 100 millizem, 1 decizem, 4 centimeters
d: day, a tenth of a decaday, a seventh of week, a fifth of a pentaday, 10 decidays, 24 hours, 100 centidays, 1000 millidays, 1440 minutes, 86400 seconds, 100000 beats, the inverse of a quotidie
mL: milliliter, a cubic centimeter, a thousandth of a liter, 15.625 drops
µL: microliter, a cubic millimeter, a millionth of a liter, 0.015625 drops
m: meridian, a full circle around the Earth moving North or South; used in the abbreviations a.m. (antemeridian) and p.m. (postmeridian); the letter “m” in meridian can be vertically flipped to get the letter “w” in wěi
do: decioctave, a tenth of a two fold change in frequency
þ: perbeat, the inverse of a beat, 1/beat, once per beat, every beat, 100000 q; symbolized by thorn (þ), which looks like a combination of the letters “p” and “b”; not to be confused with a picobeat (pb)
Tþ: teraperbeat, 1012 perbeat, the inverse of a picobeat, 1/picobeat, once per picobeat, every picobeat
q: quotidie, the inverse of a day, a hundred thousandth of a perbeat; the letter “q” in quotidie can be flipped vertically to produce the letter “d” in day
r: compass rose, a full circle along the horizon, 360 compass degress
mr: compass millirose, a thousandth of a circle along the horizon, .36 compass degress
v: omegar, ωr, 1041.6 miles per hour, 1.6 megameters per hour, 0.4629 kilometers per second, roughly 1.36 times the speed of sound
kv: kiloomegar, kωr, 1.6 gigameters per hour, 0.4629 megameters per second, approximately 0.1544% of the speed of light
mv: milliomegar, mωr, 1.0416 miles per hour, 1.6 kilometers per hour, 0.4629 meters per second, approximately 0.136% the speed of sound
w: wěi (纬), parallel, a measure of longitude; can be thought of as a measure of the width of a meridian on Earth; the letter “w” in wěi can be vertically flipped to get the letter “m” in meridian
dw: deciwěi, a tenth of a wěi (纬), a tenth of a parallel
mw: milliwěi, a thousanth of a wěi (纬), a thousanth of a parallel
x: xún (旬), decaday, a group of ten days, 2 pentadays, represented by x like the Roman numeral X
Jukic, A.M., D.D. Baird, C.R. Weinberg, D.R. McConnaughey, and A.J. Wilcox. 2013+215. “Length of Human Pregnancy and Contributors to Its Natural Variation.”Human Reproduction 28 (10): 2848–55. https://doi.org/10.1093/humrep/det297.
---title: Decalendardescription: > Introducing Decalendar, a solar calendar which measures time in years and days without the need for months or weeks.image: /asset/cal16.svgurl: https://maptv.github.io/dec/datedecdate: 2026+097path: /dec/dateslug: datealiases: - /date - /ddengine: knitrdraft: truecrossref: fig-prefix: Diagram fig-title: Diagram---:::{.datenav #fig-topdatenav}{{< include /asset/_decnav.qmd >}}:::# Decalendar {#decalendar .unnumbered .hiddenheading}My website serves as a demonstration of both the [Quarto](https://quarto.org) publishing📤system and the [Dec](/dec) measurement📐system. I use several clever hacks to get Quarto to display all of the dates on my website in the Dec year+day format. Knowing the basics of the Dec calendar🗓️(Decalendar) will help you to understand the [filter](https://quarto.org/docs/extensions/filters.html) and [include](https://quarto.org/docs/output-formats/html-basics.html#includes) articles in the [Quarto section](/quarto) of my site.Among its many features, Quarto offers support for the [Observable](https://observablehq.com/) data visualization system. Observable is my top choice for interactive graphics. We can interact with the two Observable [calendar plots](https://observablehq.com/@observablehq/plot-calendar)below⬇️using the adjacent Observable [inputs](https://observablehq.com/documentation/inputs/overview). The [scrubber](https://observablehq.com/@mbostock/scrubber)🧽input is a great place to start because it cycles🔄through every value of the [range](https://observablehq.com/@observablehq/input-range)🎚️inputs beneath it.# Day of year (doy) {#sec-doy}To activate the scrubber input, press the "Play"▶️button above⬆️the range inputs. Upon activation, the box around the selected day in each plot will move back and forth between the first "day of year" ([doy](#doy){#dayofyear .tool data-bs-toggle="tooltip" data-bs-title="day of year"}), [d]{#day .tool data-bs-toggle="tooltip" data-bs-title="day"}[0]{.color0}, and the last [doy](#doy){.tool data-bs-toggle="tooltip" data-bs-title="day of year"}, which is either [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}[364]{.color364by365} or [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}[365]{.color365by366}. To insert or remove [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}[365]{.color365by366}, use the "Year length" [radio](https://observablehq.com/@observablehq/input-radio)📻input to set the number of days in the year.The insertion of [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}[365]{.color365by366} shifts 306 dates, [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}\${march1doy} to [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}\${december31doy}, in the [Gregorian calendar](https://en.wikipedia.org/wiki/Gregorian_calendar#:~:text=the%20calendar%20used%20in%20most%20parts%20of%20the%20world) by 1 day, but does not change the order of any Dec dates, because [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}[365]{.color365by366} is the last day of any Dec leap year and is always followed by [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}[0]{.color0} of the subsequent Dec year ([y]{.tool data-bs-toggle="tooltip" data-bs-title="year"}+1). The "Year length" radio input also changes the value of the negative "Day of year" range input by 1 day.Similarly, the "[Coordinated Universal Time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time#:~:text=the%20primary%20time%20standard%20globally%20used%20to%20regulate%20clocks%20and%20time) ([UTC](#utc){#coordinateduniversaltime .tool data-bs-toggle="tooltip" data-bs-title="Coordinated Universal Time"}) [offset](https://en.wikipedia.org/wiki/UTC_offset#:~:text=the%20difference%20in%20hours%20and%20minutes%20between%20Coordinated%20Universal%20Time%20(UTC)%20and%20the%20standard%20time%20at%20a%20particular%20place)" radio input shifts the Gregorian calendar date selected by the "Month" and "Day of month" range inputs by 1 day. The "UTC offset" radio input will also shift the Decalendar plot [cell](https://observablehq.com/plot/marks/cell) colors🎨by 1 day if the "[Color scheme](https://en.wikipedia.org/wiki/Color_scheme#:~:text=a%20combination%20of%202%20or%20more%20colors%20used%20in%20aesthetic%20or%20practical%20design)" radio input is set to the "Month" [discrete scheme](https://en.wikipedia.org/wiki/Color_scheme#:~:text=feature%20only%20a%20certain%20subset%20of%20a%20continuous%20color%20scheme) instead of the "Day" [continuous scheme](https://en.wikipedia.org/wiki/Color_scheme#:~:text=display%20sets%20of%20continuous%2C%20ordered%20data).From the perspective of Dec, month color labels🏷️are only useful if we want to compare the Dec and Gregorian calendars. In contrast, Dec day color labels can help us sort days into groups of 100 called [hectodays]{.tool data-bs-toggle="tooltip" data-bs-title="hundreds of days"} ([h](#h){#hectoday .tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}) and groups of 10 named [xún](https://en.wikipedia.org/wiki/Chinese_calendar#:~:text=into%20nine%2D%20or-,ten%2Dday%20weeks,-known%20as%20x%C3%BAn) ([x](#x){#xun .tool data-bs-toggle="tooltip" data-bs-title="groups of ten days"}). Dec defines [meterological seasons](https://en.wikipedia.org/wiki/Season#Meteorological:~:text=reckoned%20by%20temperature) in terms of [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"} and uses [x]{.tool data-bs-toggle="tooltip" data-bs-title="groups of ten days"} instead of Gregorian calendar months and weeks.The "Plot layout" radio input rotates the calendar plots by a quarter turn, interchanging the horizontal (↔) and vertical (↕) axes. The axis labels demonstrate that [x]{.tool data-bs-toggle="tooltip" data-bs-title="groups of ten days"} and "days of xún" ([dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"}) are analogous to weeks and "days of week" ([dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}). If we multiply an [x]{.tool data-bs-toggle="tooltip" data-bs-title="groups of ten days"} \${layoInput ? "↔" : "↕"} axis label by ten and add it to a [dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"} \${layoInput ? "↕" : "↔"} axis label, we get a "positive integer [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"}" ([pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"}) cell value: \${dotyInputDek} × 10 + \${dotyInputDod} = ${dotyInput}.::: {.column-margin .overflowequation}$$\text{pid} = \text{x} \ast 10 + \text{dox}$$ {#eq-pid}$$\text{dyl} = \text{pid} - \text{nid}$$ {#eq-dyl}:::There are two range inputs labelled "Day of year" because every [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"} can be expressed as either a positive or a negative integer. The [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} is the number of days that have passed in the year, the [absolute value](https://en.wikipedia.org/wiki/Absolute_value#:~:text=non%2Dnegative%29-,magnitude%20of,measured%20without%20regard%20to%20its%20sign,-.%20Namely%2C) of the "negative integer [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"}" ([nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"}) is the number of days left in the year, and their [difference](https://en.wikipedia.org/wiki/Subtraction#Notation_and_terminology:~:text=The%20result%20is%20the%20difference) is the "Decalendar year length" ([dyl]{.tool data-bs-toggle="tooltip" data-bs-title="Decalendar year length"}), which can be 365 or 366.:::{#calobservable}{{< include /dec/date/_calplots.qmd >}}:::The distinction between [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} and [nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} can be explained in terms of [computer programming](https://en.wikipedia.org/wiki/Computer_programming#:~:text=the%20composition%20of%20sequences%20of%20instructions%2C%20called%20programs%2C%20that%20computers%20can%20follow%20to%20perform%20tasks). If we think of a year as an [array](https://en.wikipedia.org/wiki/Array_(data_structure)#Element_identifier_and_addressing_formulas:~:text=a%20data%20structure%20consisting%20of%20a%20collection%20of%20elements%20(values%20or%20variables)%2C%20of%20same%20memory%20size%2C%20each%20identified%20by%20at%20least%20one%20array%20index) and each day as an array element, [dyl]{.tool data-bs-toggle="tooltip" data-bs-title="Decalendar year length"} is the number of elements in the array, [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} is a [positive](https://en.wikipedia.org/wiki/Zero-based_numbering#:~:text=a%20way%20of%20numbering%20in%20which%20the%20initial%20element%20of%20a%20sequence%20is%20assigned%20the%20index%C2%A00) index, and [nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} is a [negative index](https://en.wikipedia.org/wiki/Array_slicing#:~:text=specify%20an%20offset%20from%20the%20end%20of%20the%20array). Array [indexes](https://en.wikipedia.org/wiki/Array_(data_structure)#Element_identifier_and_addressing_formulas:~:text=individual%20objects%20are%20selected%20by%20an%20index) can be used to obtain specific array elements individually via indexing or in groups via [array slicing](https://en.wikipedia.org/wiki/Array_slicing#:~:text=an%20operation%20that%20extracts%20a%20subset%20of%20elements%20from%20an%20array). The year+day Dec date format is short for [year+day/[dyl]{.tool data-bs-toggle="tooltip" data-bs-title="Decalendar year length"}]{.nowrap}. Dec truncates dates because the [dyl]{.tool data-bs-toggle="tooltip" data-bs-title="Decalendar year length"} is not needed to specify a date, remains constant for 366, 1095, or 2920 days, has only 2 possible values: 365 or 366, and can be determined by passing Year [y]{.tool data-bs-toggle="tooltip" data-bs-title="year"} to @eq-yoe2dyl below. Nevertheless, we can use the [dyl]{.tool data-bs-toggle="tooltip" data-bs-title="Decalendar year lengths"} to convert between different kinds of Dec dates.::: {.overflowequation}$$\text{dyl}=\begin{cases} 366&{\begin{align}\text{if } (\text{y} + 1)\href{https://en.wikipedia.org/wiki/Modulo#:~:text=returns%20the%20remainder%20or%20signed%20remainder%20of%20a%20division}{\bmod} \ \ \ \ 4=0\\ \href{https://en.wikipedia.org/wiki/Logical_conjunction}{\land}(\text{y}+1)\href{https://en.wikipedia.org/wiki/Modulo#:~:text=returns%20the%20remainder%20or%20signed%20remainder%20of%20a%20division}{\bmod} 100\neq0\\ \href{https://en.wikipedia.org/wiki/Logical_disjunction}{\lor}( \text{y} + 1)\href{https://en.wikipedia.org/wiki/Modulo#:~:text=returns%20the%20remainder%20or%20signed%20remainder%20of%20a%20division}{\bmod} 400=0\end{align}}\\\\ 365&{\text{otherwise.}}\end{cases}$$ {#eq-yoe2dyl}:::Dec categorizes each date as a [countdown](https://en.wikipedia.org/wiki/Countdown#:~:text=a%20sequence%20of%20backward%20counting%20to%20indicate%20the%20time%20remaining%20before%20an%20event%20is%20scheduled%20to%20occur) or countup date, depending on whether the date counts **up** the days **since** Year [y]{.tool data-bs-toggle="tooltip" data-bs-title="year"} or counts **down** the days **until** Year [y]{.tool data-bs-toggle="tooltip" data-bs-title="year"}+1. The current year+day [UTC](#utc){.tool data-bs-toggle="tooltip" data-bs-title="Coordinated Universal Time"} date, [\${decYear}[+]{.mono}\${decDotyPad}]{.nowrap}, informs us that Year \${decYear} began \${decDoty} days ago, whereas its countdown equivalent, [\${nextYear}[-]{.mono}\${TminusPadded}]{.nowrap}, lets us know that Year \${nextYear} will begin in \${Tminus} days.::: {.column-margin .overflowequation}$$\text{y}+\dfrac{\text{pid}}{\text{dyl}} = \text{y} + 1 + \dfrac{\text{nid}}{\text{dyl}}$$ {#eq-updown}:::Both [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer days of year"} and [nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer days of year"} can be useful. If we wanted to add 285 days to the [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"} selected below, for example to predict when a pregnant🤰woman will give birth to a baby👩🍼[@jukicLengthHumanPregnancy2013], we should add 285 to the [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} if it is less than 80 in a common year or less than 81 in a leap year, but otherwise we should add 1 to the year and add 285 to the [nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"}: \${easyDoy} + 285 = \${easySum}.```{ojs}//| echo: false//| label: boundsliders//| className: slidersInputs.bind(Inputs.range([0,364+ leapInput], {step:1,label:"Day of year"}), viewof dotyInput)Inputs.bind(Inputs.range([-365- leapInput,-1], {step:1,label:"Day of year"}), viewof dotyInput1)```[First [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} of the Gregorian calendar year]{.radiotitle}```{ojs}//| echo: false//| label: boundradio//| className: radiobuttonsInputs.bind(Inputs.radio(["Sun","Mon","Tue","Wed","Thu","Fri","Sat"], {value: gregBoyDotwStr}), viewof dotwInput)```The [radio](https://observablehq.com/@observablehq/input-radio) input beneath the plots selects the [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} for [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}\${january1doy}, the first day of the Gregorian calendar year. Changing the [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}\${january1doy} [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} shifts every Gregorian calendar date by one to six days without affecting Decalendar. A leap year that begins on the last [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}, [Dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} 6, has an extra "week of year" ([woy]{.tool data-bs-toggle="tooltip" data-bs-title="week of year"}), but its first and last [woy]{.tool data-bs-toggle="tooltip" data-bs-title="week of year"}, Weeks 0 and 53, have only one day. Although weeks determine the shape of the Gregorian calendar plot, its cell values are "days of month" ([dom]{.tool data-bs-toggle="tooltip" data-bs-title="days of month"}). We can uniquely identify🪪a specific day in any year with a [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"}, instead of a month and a [dom]{.tool data-bs-toggle="tooltip" data-bs-title="day of month"}. Except for [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}[365]{.color365by366} in leap years, every year has the same [x]{.tool data-bs-toggle="tooltip" data-bs-title="groups of ten days"}, [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}, and months, but not the same weeks, because the [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}\${january1doy} [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} varies from year to year.# Day of xún (dox) {#sec-dox}In contrast to a week, an [x]{.tool data-bs-toggle="tooltip" data-bs-title="group of ten days"} can be split evenly into either five pairs of days or two equal halves called "pentadays of xún" ([pox]{.tool data-bs-toggle="tooltip" data-bs-title="pentadays of xún"}). Likewise, a common year can be divided evenly into 73 "pentadays" ([p](#p){#pentaday .tool data-bs-toggle="tooltip" data-bs-title="pentadays"}). The last [p]{.tool data-bs-toggle="tooltip" data-bs-title="pentaday"} of a leap year, [p]{.tool data-bs-toggle="tooltip" data-bs-title="pentaday"}73, consists of the final day of the leap year, [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}[365]{.color365by366}, and the first four days of the subsequent year: Days 0 to 3.In the context of a common year, [p]{.tool data-bs-toggle="tooltip" data-bs-title="pentaday"}73 is synonymous with [p]{.tool data-bs-toggle="tooltip" data-bs-title="pentaday"}0 of the subsequent year. To obtain the current [p]{.tool data-bs-toggle="tooltip" data-bs-title="pentaday"}, we double the current [x]{.tool data-bs-toggle="tooltip" data-bs-title="groups of ten days"} and add the current [pox]{.tool data-bs-toggle="tooltip" data-bs-title="pentaday of xún"}, which is 1 if the current [dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"} is greater than 4 and 0 otherwise: ${decPent} = \${decDek} × 2 + [\${decDotd} > 4]. If we divide a [dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"} by 5, the remainder will be its corresponding "day of pentaday" ([dop]{.tool data-bs-toggle="tooltip" data-bs-title="days of pentaday"}): \${decDek} [mod](https://en.wikipedia.org/wiki/Modulo#:~:text=returns%20the%20remainder) 5 = \${decDotp}. ::: {.column-margin .overflowequation}$$\text{pox} = \left[\text{dox} > 4\right]$$ {#eq-pox}$$\text{p = x} \ast 2 + \text{pox}$$ {#eq-poy}$$\text{dop = dox} \href{https://en.wikipedia.org/wiki/Modulo#:~:text=returns%20the%20remainder%20or%20signed%20remainder%20of%20a%20division}{\bmod} 5$$ {#eq-dop}:::In @fig-zero below, each row is a [pox]{.tool data-bs-toggle="tooltip" data-bs-title="pentaday of xún"} and each square node is a [dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"}. @fig-zero visualizes Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"}, a Dec schedule that plans for exactly 219 work days per year, which is close to the 208 to 210 work days per year provisioned by a [four-day workweek](https://en.wikipedia.org/wiki/Four-day_workweek#:~:text=an%20arrangement%20where%20a%20workplace%20or%20place%20of%20education%20has%20its%20employees%20or%20students%20work%20or%20attend%20school%2C%20college%20or%20university%20over%20the%20course%20of%20four%20days%20per%20week). Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"} designates [Dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"} 1, 2, 3, 6, 7, and 8 as work days and [Dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"} 0, 4, 5, and 9 as rest days. ::: {.centered}### Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"} ([Dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"} 0 to 9) {.diagtitle}:::::: {#fig-zero .doxdiagram}```{mermaid}%%{init: {'theme': 'default', 'themeVariables': { 'fontSize': '29px'}}}%%flowchart LR B~~~M[ ]:::empty----N[ ]:::empty W---M N---O[ ]:::empty Q[ ]:::empty---L W[ ]:::empty-->A[0]-->B[1]-->C[2]-->D[3]-->E[4]---L[ ]:::empty Y[ ]:::empty-->F[5]-->G[6]-->H[7]-->I[8]-->J[9]---O[ ]:::empty B~~~P[ ]:::empty---Q Y---P subgraph workdays[work] B C G H D I end subgraph restdays[ ] A F E J workdays end classDef empty width:0px;```:::Dec identifies groups of days between [Dop]{.tool data-bs-toggle="tooltip" data-bs-title="day of pentaday"} 0 and 4 and betwixt [Dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"} 0 and 9 as "pentaday interquintile ranges" ([pir]{.tool data-bs-toggle="tooltip" data-bs-title="pentaday interquintile ranges"}) and "xún interdecile ranges" ([xir]{.tool data-bs-toggle="tooltip" data-bs-title="xún interdecile ranges"}), respectively. The acronyms [pir]{.tool data-bs-toggle="tooltip" data-bs-title="pentaday interquintile range"} and [xir]{.tool data-bs-toggle="tooltip" data-bs-title="xún interdecile range"} are derived from the terms [quintile](https://en.wiktionary.org/wiki/quintile#:~:text=quantiles%20which%20divide%20an%20ordered%20sample%20population%20into%20five%20equally%20numerous%20subsets), [decile](https://en.wikipedia.org/wiki/Decile#:~:text=nine%20values%20that%20divide%20the%20sorted%20data%20into%20ten%20equal%20parts), and [interquartile range](https://en.wikipedia.org/wiki/Interquartile_range#:~:text=a%20measure%20of%20statistical%20dispersion). If we follow Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"}, a [pir]{.tool data-bs-toggle="tooltip" data-bs-title="pentaday interquintile ranges"} is to a [workweek](https://en.wikipedia.org/wiki/Workweek_and_weekend#:~:text=the%20part%20of%20the%20seven%2Dday%20week%20devoted%20to%20working) as a [p](#p){.tool data-bs-toggle="tooltip" data-bs-title="pentaday"} is to a week and as a [x]{.tool data-bs-toggle="tooltip" data-bs-title="groups of ten days"} is to a [fortnight](https://en.wikipedia.org/wiki/Fortnight#:~:text=a%20unit%20of%20time%20equal%20to%2014%20days).The pair of days between two [pir]{.tool data-bs-toggle="tooltip" data-bs-title="pentaday interquintile ranges"} is called a "[liminal](https://en.wikipedia.org/wiki/Liminality#:~:text=the%20quality%20of%20ambiguity%20or%20disorientation%20that%20occurs%20in%20the%20middle%20stage%20of%20a%20rite%20of%20passage) interconnecting margin" ([lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"}). The last [lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} of a common year, [Lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} 73, comprises Days 364 and 0 and is synonymous with [Lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} 0 of the subsequent year. In a leap year, [Lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} 73 consists of Days 364 and 365 and overlaps with [Lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} 74, which is composed of Days 365 and 0 and is equivalent to [Lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} 0 of the succeeding year.Except for [Lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} 74, every even-numbered [lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} is the border that separates two [xir]{.tool data-bs-toggle="tooltip" data-bs-title="xún interdecile ranges"}. With the exception of [Lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} 73, every odd-numbered [lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} is flanked by the two [pir]{.tool data-bs-toggle="tooltip" data-bs-title="pentaday interquintile ranges"} within each [xir]{.tool data-bs-toggle="tooltip" data-bs-title="xún interdecile range"}. @fig-zerocomm below shows the last 5 [doy]{.tool data-bs-toggle="tooltip" data-bs-title="days of year"} of a common year and the first 5 [doy]{.tool data-bs-toggle="tooltip" data-bs-title="days of year"} of the following year, which include the last day of [Lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} 72, Pir 72, [Lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} 0, Pir 0, and the first day of [Lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} 1.::: {.centered}### Schedule L ([p]{.tool data-bs-toggle="tooltip" data-bs-title="pentaday"}72 and [p]{.tool data-bs-toggle="tooltip" data-bs-title="pentaday"}0) {.diagtitle}:::::: {#fig-zerocomm .doxdiagram}```{mermaid}%%{init: {'theme': 'default', 'themeVariables': { 'fontSize': '29px'}}}%%flowchart LR W~~~~O[ ]:::empty W[ ]:::empty-->A[360]-->B[361]-->C[362]-->D[363]-->E[364]----L[ ]:::empty Y[ ]:::empty-->F[0]-->G[1]-->H[2]-->I[3]-->J[4]-->K[ ]:::empty Q[ ]:::empty---L Y---Q subgraph workdays[work] B C G H D I end subgraph restdays[ ] A F E J workdays end classDef empty width:0px;```:::The diagrams above illustrate that the transition from a common year preserves the alternating pattern of two-day [lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} and three-day [pir]{.tool data-bs-toggle="tooltip" data-bs-title="pentaday interquintile ranges"}. After 4 or 8 years, this pattern is interrupted by [Lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} 73 and 74 at the end of a leap year. In @fig-zeroleap below, this interruption manifests as an extra [doy]{.tool data-bs-toggle="tooltip" data-bs-title="days of year"} per row which puts Day 364 alongside Day 365 and Day 4 beside Day 5. ::: {.centered}### Schedule L ([d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}360 to [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}365 and [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}0 to [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}5) {.diagtitle}:::::: {#fig-zeroleap .doxdiagram}```{mermaid}%%{init: {'theme': 'default', 'themeVariables': { 'fontSize': '29px'}}}%%flowchart LR W~~~~O[ ]:::empty W[ ]:::empty-->A[360]-->B[361]-->C[362]-->D[363]-->E[364]-->L[365]----S[ ]:::empty Y[ ]:::empty-->F[0]-->G[1]-->H[2]-->I[3]-->J[4]-->K[5]-->T[ ]:::empty Q[ ]:::empty---S Y---Q subgraph workdays[work] B C G H D I end subgraph restdays[ ] A F E J K L workdays end classDef empty width:0px;```:::According to Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"}, [pir]{.tool data-bs-toggle="tooltip" data-bs-title="pentaday interquintile ranges"} only contain workdays and [lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} are solely made up of rest days. When we follow Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"}, a [lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminals"} is the Dec analog of a weekend. To make [lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} appear like weekends we can start from [Dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"} 1 instead of [Dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"} 0 as in the @fig-one below, which displays its [lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} as a two-by-two square grid on the right like [Lim]{.tool data-bs-toggle="tooltip" data-bs-title="liminal interconnecting margin"} 73 and 1 in @fig-zeroleap above.::: {.centered}### Schedule L ([Dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"} 1 to 0) {.diagtitle}:::::: {#fig-one .doxdiagram}```{mermaid}%%{init: {'theme': 'default', 'themeVariables': { 'fontSize': '29px'}}}%%flowchart LR B~~~M[ ]:::empty----N[ ]:::empty W---M N---O[ ]:::empty Q[ ]:::empty---L W[ ]:::empty-->A[1]-->B[2]-->C[3]-->D[4]-->E[5]---L[ ]:::empty Y[ ]:::empty-->F[6]-->G[7]-->H[8]-->I[9]-->J[0]---O[ ]:::empty B~~~P[ ]:::empty---Q Y---P subgraph workdays[work] A B C F G H end subgraph restdays[ ] D E I J workdays end classDef empty width:0px;```:::The order of [dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"} in @fig-one is different than all of the previous diagrams but all of the diagrams above show Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"} because the categorization of [dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"} as work or rest days remains unchanged. If we left [rotate](https://en.wikipedia.org/wiki/Circular_shift#:~:text=moving%20the%20final%20entry%20to%20the%20first%20position%2C%20while%20shifting%20all%20other%20entries%20to%20the%20next%20position%2C%20or%20by%20performing%20the%20inverse%20operation) (↺) the [dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"} categories of Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"} by 1 day, we get the Schedule [X]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal X is decimal 28 or binary 11100"} Dec schedule: [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"} ↺ 1 = [X]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal X is decimal 28 or binary 11100"}. Schedule [X]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal X is decimal 28 or binary 11100"} groups rest days at the end of each [p]{.tool data-bs-toggle="tooltip" data-bs-title="pentaday"}.::: {.centered}### Schedule [X]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal X is decimal 28 or binary 11100"} ([Dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"} 0 to 9) {.diagtitle}:::::: {#fig-xpos .doxdiagram}```{mermaid}%%{init: {'theme': 'default', 'themeVariables': { 'fontSize': '29px'}}}%%flowchart LR B~~~M[ ]:::empty----N[ ]:::empty W---M N---O[ ]:::empty Q[ ]:::empty---L W[ ]:::empty-->A[0]-->B[1]-->C[2]-->D[3]-->E[4]---L[ ]:::empty Y[ ]:::empty-->F[5]-->G[6]-->H[7]-->I[8]-->J[9]---O[ ]:::empty B~~~P[ ]:::empty---Q Y---P subgraph workdays[work] A B C F G H end subgraph restdays[ ] D E I J workdays end classDef empty width:0px;```:::If we follow Schedule [X]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal X is decimal 28 or binary 11100"}, there will be 4 consecutive work days during any transition from a leap year. To limit the number of consecutive work days to 3, we could right rotate (↻) Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"} and obtain Schedule [F]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal F is decimal 7 or binary 00111"}: [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"} ↻ 1 = [F]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal F is decimal 7 or binary 00111"}. Unlike Schedule [X]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal X is decimal 28 or binary 11100"}, Schedule [F]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal F is decimal 7 or binary 00111"} handles yearly transitions just as gracefully as Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"} and provisions the exact same number of work days per year.::: {.centered}### Schedule [F]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal F is decimal 7 or binary 00111"} ([Dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"} 0 to 9) {.diagtitle}:::::: {#fig-fpos .doxdiagram}```{mermaid}%%{init: {'theme': 'default', 'themeVariables': { 'fontSize': '29px'}}}%%flowchart LR M[ ]:::empty----N[ ]:::empty W---M N---O[ ]:::empty Q[ ]:::empty---L W[ ]:::empty-->A[0]-->B[1]-->C[2]-->D[3]-->E[4]---L[ ]:::empty Y[ ]:::empty-->F[5]-->G[6]-->H[7]-->I[8]-->J[9]---O[ ]:::empty P[ ]:::empty---Q Y---P subgraph workdays[work] C D E H I J end subgraph restdays[ ] A B F G workdays end classDef empty width:0px;```:::Each of the 32 base Dec schedules can be expressed as a 5-bit [binary](https://en.wikipedia.org/wiki/Binary_number#:~:text=only%20two%20symbols%20for%20the%20natural%20numbers%3A%20typically%200%20%28zero%29%20and%201%20%28one%29) ([base2]{.tool data-bs-toggle="tooltip" data-bs-title="binary"}) sequence. Of these 32 binary sequences, 8 are palindromes. If a Dec schedule can be represented by a 5-bit palindrome, we can identify its work and rest days by the last digit of not only the [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer days of year"} but also either the subsequent [nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} ([ni[d]{.acute}]{.tool data-bs-toggle="tooltip" data-bs-title="next negative integer day of year"}) in common years or the [nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} after next ([ni[d]{.doubleacute}]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"}) in leap years.To get the [ni[d]{.acute}]{.tool data-bs-toggle="tooltip" data-bs-title="next negative integer day of year"}, we sum the [nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} and one: [ni[d]{.acute}]{.tool data-bs-toggle="tooltip" data-bs-title="next negative integer day of year"} = [nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} + 1. Similarly, the [ni[d]{.doubleacute}]{.nowrap .tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year after next"} is the sum of the [nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} and two: [ni[d]{.doubleacute}]{.nowrap .tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year after next"} = [nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} + 2. @tbl-vincommon below displays the [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer days of year"}, [nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"}, and [ni[d]{.acute}]{.tool data-bs-toggle="tooltip" data-bs-title="next negative integer day of year"} of the first and final 11 days of a common year. We can convert any [nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer days of year"} into a "mixed integer [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"}" ([mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"}) and then use the last digit of the [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} to discern between the work and rest days of any of the 32 base Dec schedules in common years.The horizontal line above all but the last digit of the [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} in @tbl-vincommon is called a [vinculum](https://en.wikipedia.org/wiki/Vinculum_(symbol)#:~:text=a%20horizontal%20line%20used%20in%20mathematical%20notation%20for%20various%20purposes). In Dec, a vinculum negates whatever is beneath it. Negating all of the digits of an integer flips its [sign](https://en.wikipedia.org/wiki/Sign_(mathematics)#:~:text=property%20of%20being%20either%20positive%2C%20negative%2C%20or%200). Negative integers can be denoted by vinculum instead of a [minus sign](https://en.wikipedia.org/wiki/Plus_and_minus_signs#Minus_sign:~:text=When%20it%20is%20placed%20immediately%20before%20an%20unsigned%20number%2C%20the%20combination%20names%20a%20negative%20number%2C%20the%20additive%20inverse%20of%20the%20positive%20number%20that%20the%20numeral%20would%20otherwise%20name). For example, [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}[1]{.overline} and [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}[1]{.overline}9 are two equivalent ways to write Day -1, the last day of the Decalendar year.::::: {#tbl-vincommon}::: {.d-block .d-xl-none}|[pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer days of year"} |||[nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} |||[ni[d]{.acute}]{.tool data-bs-toggle="tooltip" data-bs-title="next negative integer day of year"} |[mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} ||-----|-|-|------|-|-|------------------|------------------|| 0 ||| -365 ||| -36[4]{.acute} |[37]{.overline}5 || 1 ||| -364 ||| -36[3]{.acute} |[37]{.overline}6 || 2 ||| -363 ||| -36[2]{.acute} |[37]{.overline}7 || 3 ||| -362 ||| -36[1]{.acute} |[37]{.overline}8 || 4 ||| -361 ||| -36[0]{.acute} |[37]{.overline}9 || 5 ||| -360 ||| -35[9]{.acute} |[36]{.overline}0 || 6 ||| -359 ||| -35[8]{.acute} |[36]{.overline}1 || 7 ||| -358 ||| -35[7]{.acute} |[36]{.overline}2 || 8 ||| -357 ||| -35[6]{.acute} |[36]{.overline}3 || 9 ||| -356 ||| -35[5]{.acute} |[36]{.overline}4 || 10 ||| -355 ||| -35[4]{.acute} |[36]{.overline}5 || ... ||| ... ||| ... | ... || 354 ||| -11 ||| -1[0]{.acute} |[2]{.overline}9 || 355 ||| -10 ||| -[9]{.acute} |[1]{.overline}0 || 356 ||| -9 ||| -[8]{.acute} |[1]{.overline}1 || 357 ||| -8 ||| -[7]{.acute} |[1]{.overline}2 || 358 ||| -7 ||| -[6]{.acute} |[1]{.overline}3 || 359 ||| -6 ||| -[5]{.acute} |[1]{.overline}4 || 360 ||| -5 ||| -[4]{.acute} |[1]{.overline}5 || 361 ||| -4 ||| -[3]{.acute} |[1]{.overline}6 || 362 ||| -3 ||| -[2]{.acute} |[1]{.overline}7 || 363 ||| -2 ||| -[1]{.acute} |[1]{.overline}8 || 364 ||| -1 ||| -[0]{.acute} |[1]{.overline}9 |:::::: {.d-none .d-xl-block}|[pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer days of year"} ||[nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} ||[ni[d]{.acute}]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} |[mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} ||||||||||[pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer days of year"} ||[nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} ||[ni[d]{.acute}]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} |[mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} ||----|-|------|-|----------------|------------------|-|-|-|-|-|-|-|-|-|-----|-|-----|-|---------------|------------------|| 0 || -365 || -36[4]{.acute} |[37]{.overline}5 |||||||||| 354 || -11 || -1[0]{.acute} |[2]{.overline}9 || 1 || -364 || -36[3]{.acute} |[37]{.overline}6 |||||||||| 355 || -10 || -[9]{.acute} |[1]{.overline}0 || 2 || -363 || -36[2]{.acute} |[37]{.overline}7 |||||||||| 356 || -9 || -[8]{.acute} |[1]{.overline}1 || 3 || -362 || -36[1]{.acute} |[37]{.overline}8 |||||||||| 357 || -8 || -[7]{.acute} |[1]{.overline}2 || 4 || -361 || -36[0]{.acute} |[37]{.overline}9 |||||||||| 358 || -7 || -[6]{.acute} |[1]{.overline}3 || 5 || -360 || -35[9]{.acute} |[36]{.overline}0 |||||||||| 359 || -6 || -[5]{.acute} |[1]{.overline}4 || 6 || -359 || -35[8]{.acute} |[36]{.overline}1 |||||||||| 360 || -5 || -[4]{.acute} |[1]{.overline}5 || 7 || -358 || -35[7]{.acute} |[36]{.overline}2 |||||||||| 361 || -4 || -[3]{.acute} |[1]{.overline}6 || 8 || -357 || -35[6]{.acute} |[36]{.overline}3 |||||||||| 362 || -3 || -[2]{.acute} |[1]{.overline}7 || 9 || -356 || -35[5]{.acute} |[36]{.overline}4 |||||||||| 363 || -2 || -[1]{.acute} |[1]{.overline}8 || 10 || -355 || -35[4]{.acute} |[36]{.overline}5 |||||||||| 364 || -1 || -[0]{.acute} |[1]{.overline}9 |::::::::The [correlation](https://en.wikipedia.org/wiki/Correlation#:~:text=the%20extent%20to%20which%20a%20pair%20of%20quantities%20are%20linearly%20related) between a digit and the [absolute value](https://en.wikipedia.org/wiki/Absolute_value#:~:text=measured%20without%20regard%20to%20its%20sign) ([magnitude](https://en.wikipedia.org/wiki/Magnitude_(mathematics)#:~:text=The%20magnitude%20of,its%20absolute%20value)) of its mixed integer is positive for positive digits and negative for negative digits. Each negative digit in the [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} column of @tbl-vincommon pulls the magnitude of its [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} towards one, meanwhile each positive digit in that column moves the magnitude of its [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} in the opposite direction along the [number line](https://en.wikipedia.org/wiki/Number_line#:~:text=spatial%20representation%20of%20numbers).In a common year, the last digits of [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer days of year"} and [ni[d]{.acute}]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} run antiparallel to each other like complementary strands of [deoxyribonucleic acid](https://en.wikipedia.org/wiki/DNA#:~:text=a%20polymer%20composed%20of%20two%20polynucleotide%20chains%20that%20coil%20around%20each%20other%20to%20form%20a%20double%20helix)🧬, but instead of [adenine](https://en.wikipedia.org/wiki/Adenine#:~:text=a%20purine%20nucleotide%20base%20that%20is%20found%20in%20DNA) to [thymine](https://en.wikipedia.org/wiki/Thymine#:~:text=one%20of%20the%20four%20nucleotide%20bases%20in%20the%20nucleic%20acid%20of%20DNA) and [cytosine](https://en.wikipedia.org/wiki/Cytosine#:~:text=one%20of%20the%20four%20nucleotide%20bases%20found%20in%20DNA) to [guanine](https://en.wikipedia.org/wiki/Guanine#:~:text=one%20of%20the%20four%20main%20nucleotide%20bases), the pattern is 0 to [4]{.acute}, 1 to [3]{.acute}, 2 to [2]{.acute}, 3 to [1]{.acute}, 4 to [0]{.acute}, and so on. The final digits of [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer days of year"} and [ni[d]{.doubleacute}]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer days of year"} follow the same pattern in leap years: 0 to [4]{.doubleacute}, 1 to [3]{.doubleacute}, 2 to [2]{.doubleacute}, 3 to [1]{.doubleacute}, 4 to [0]{.doubleacute}, and so on.The last digits of [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer days of year"} and [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer days of year"} are misaligned by 4 days in leap years and by 5 days in common years. Dec maintains a constant 5-day misalignment by replacing the [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} with the next [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} ([mi[d]{.grave}]{.tool data-bs-toggle="tooltip" data-bs-title="next mixed integer day of year"}) in leap years. The accents above [ni[d]{.acute}]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} and [mi[d]{.grave}]{.tool data-bs-toggle="tooltip" data-bs-title="next mixed integer day of year"} both advance the apparent [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"} by one day. @tbl-vinculeap below shows the [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer days of year"}, [nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"}, [ni[d]{.doubleacute}]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"}, and [mi[d]{.grave}]{.tool data-bs-toggle="tooltip" data-bs-title="next mixed integer day of year"} of the first and last 11 days of a leap year.::::: {#tbl-vinculeap}::: {.d-block .d-xl-none}|[pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer days of year"} |||[nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} |||[ni[d]{.doubleacute}]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} |[mi[d]{.grave}]{.tool data-bs-toggle="tooltip" data-bs-title="next mixed integer day of year"} ||-----|-|-|------|-|-|----------------------|----------------------------|| 0 ||| -366 ||| -36[4]{.doubleacute} |[37]{.overline}[5]{.grave} || 1 ||| -365 ||| -36[3]{.doubleacute} |[37]{.overline}[6]{.grave} || 2 ||| -364 ||| -36[2]{.doubleacute} |[37]{.overline}[7]{.grave} || 3 ||| -363 ||| -36[1]{.doubleacute} |[37]{.overline}[8]{.grave} || 4 ||| -362 ||| -36[0]{.doubleacute} |[37]{.overline}[9]{.grave} || 5 ||| -361 ||| -36[9]{.doubleacute} |[36]{.overline}[0]{.grave} || 6 ||| -360 ||| -35[8]{.doubleacute} |[36]{.overline}[1]{.grave} || 7 ||| -359 ||| -35[7]{.doubleacute} |[36]{.overline}[2]{.grave} || 8 ||| -358 ||| -35[6]{.doubleacute} |[36]{.overline}[3]{.grave} || 9 ||| -357 ||| -35[5]{.doubleacute} |[36]{.overline}[4]{.grave} || 10 ||| -356 ||| -35[4]{.doubleacute} |[36]{.overline}[5]{.grave} || ... ||| ... ||| ... | ... || 355 ||| -11 ||| -[9]{.doubleacute} |[1]{.overline}[0]{.grave} || 356 ||| -10 ||| -[8]{.doubleacute} |[1]{.overline}[1]{.grave} || 357 ||| -9 ||| -[7]{.doubleacute} |[1]{.overline}[2]{.grave} || 358 ||| -8 ||| -[6]{.doubleacute} |[1]{.overline}[3]{.grave} || 359 ||| -7 ||| -[5]{.doubleacute} |[1]{.overline}[4]{.grave} || 360 ||| -6 ||| -[4]{.doubleacute} |[1]{.overline}[5]{.grave} || 361 ||| -5 ||| -[3]{.doubleacute} |[1]{.overline}[6]{.grave} || 362 ||| -4 ||| -[2]{.doubleacute} |[1]{.overline}[7]{.grave} || 363 ||| -3 ||| -[1]{.doubleacute} |[1]{.overline}[8]{.grave} || 364 ||| -2 ||| -[0]{.doubleacute} |[1]{.overline}[9]{.grave} || 365 ||| -1 ||| -[0]{.acute} |[0]{.overline}[0]{.grave} |:::::: {.d-none .d-xl-block}|[pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer days of year"} ||[nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} ||[ni[d]{.doubleacute}]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} |[mi[d]{.grave}]{.tool data-bs-toggle="tooltip" data-bs-title="next mixed integer day of year"} ||||||||||[pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer days of year"} ||[nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} ||[ni[d]{.doubleacute}]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} |[mi[d]{.grave}]{.tool data-bs-toggle="tooltip" data-bs-title="next mixed integer day of year"} ||----|-|------|-|----------------------|----------------------------|-|-|-|-|-|-|-|-|-|-----|-|-----|-|--------------------|----------------------------|| 0 || -366 || -36[4]{.doubleacute} |[37]{.overline}[5]{.grave} |||||||||| 354 || -11 || -[9]{.doubleacute} |[1]{.overline}[0]{.grave} || 1 || -365 || -36[3]{.doubleacute} |[37]{.overline}[6]{.grave} |||||||||| 355 || -10 || -[8]{.doubleacute} |[1]{.overline}[1]{.grave} || 2 || -364 || -36[2]{.doubleacute} |[37]{.overline}[7]{.grave} |||||||||| 356 || -9 || -[7]{.doubleacute} |[1]{.overline}[2]{.grave} || 3 || -363 || -36[1]{.doubleacute} |[37]{.overline}[8]{.grave} |||||||||| 357 || -8 || -[6]{.doubleacute} |[1]{.overline}[3]{.grave} || 4 || -362 || -36[0]{.doubleacute} |[37]{.overline}[9]{.grave} |||||||||| 358 || -7 || -[5]{.doubleacute} |[1]{.overline}[4]{.grave} || 5 || -361 || -36[9]{.doubleacute} |[36]{.overline}[0]{.grave} |||||||||| 359 || -6 || -[4]{.doubleacute} |[1]{.overline}[5]{.grave} || 6 || -360 || -35[8]{.doubleacute} |[36]{.overline}[1]{.grave} |||||||||| 360 || -5 || -[3]{.doubleacute} |[1]{.overline}[6]{.grave} || 7 || -359 || -35[7]{.doubleacute} |[36]{.overline}[2]{.grave} |||||||||| 361 || -4 || -[2]{.doubleacute} |[1]{.overline}[7]{.grave} || 8 || -358 || -35[6]{.doubleacute} |[36]{.overline}[3]{.grave} |||||||||| 362 || -3 || -[1]{.doubleacute} |[1]{.overline}[8]{.grave} || 9 || -357 || -35[5]{.doubleacute} |[36]{.overline}[4]{.grave} |||||||||| 363 || -2 || -[0]{.doubleacute} |[1]{.overline}[9]{.grave} || 10 || -356 || -35[4]{.doubleacute} |[36]{.overline}[5]{.grave} |||||||||| 364 || -1 || -[0]{.acute} |[0]{.overline}[0]{.grave} |::::::::The Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"} rule for categorization of work and rest days can be summarized as [[doy](#doy){.tool data-bs-toggle="tooltip" data-bs-title="day of year"} [mod](https://en.wikipedia.org/wiki/Modulo#:~:text=returns%20the%20remainder) 5 ∈ {1,2,3}], where ∈ means "is an element of" and {1,2,3} is Set [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"}, a [set](https://en.wikipedia.org/wiki/Set_(mathematics)#:~:text=a%20set%20is-,a%20collection%20of%20different%20things,-%5B1%5D) which contains all of the [dop]{.tool data-bs-toggle="tooltip" data-bs-title="days of pentaday"} that are work days according to Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"}. The [doy](#doy){.tool data-bs-toggle="tooltip" data-bs-title="day of year"} in the Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"} rule can be the [mid]{.tool data-bs-toggle="tooltip" data-bs-title="next mixed integer day of year"} or [ni[d]{.acute}]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} in common years, the [mi[d]{.grave}]{.tool data-bs-toggle="tooltip" data-bs-title="next mixed integer day of year"} or [ni[d]{.doubleacute}]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} in leap years, or the [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer days of year"} in all years.## Base32 {#b32 .hiddenheading}The Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"} pattern of rest and work days can be expressed in [binary](https://en.wikipedia.org/wiki/Binary_number#:~:text=only%20two%20symbols%20for%20the%20natural%20numbers%3A%20typically%200%20%28zero%29%20and%201%20%28one%29) ([base2]{.tool data-bs-toggle="tooltip" data-bs-title="binary"}) as 01110, [decimal](https://en.wikipedia.org/wiki/Decimal#:~:text=a%20numeral%20system%20that%20uses%20ten%20as%20its%20radix%20%28base%29) ([base10]{.tool data-bs-toggle="tooltip" data-bs-title="decimal"}) as 14, or Dec [duotrigesimal](https://en.wiktionary.org/wiki/duotrigesimal#:~:text=Based%20upon%20the%20number%20thirty%2Dtwo) ([base32]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal"}) as [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"}. Each of the 32 Dec base schedules can be represented by a single letter of the Dec base32 ([b32]{.tool data-bs-toggle="tooltip" data-bs-title="Dec base32"}) alphabet. The [b32]{.tool data-bs-toggle="tooltip" data-bs-title="Dec base32"} letters are listed in @tbl-b32 below alongside their base10 ([b10]{.tool data-bs-toggle="tooltip" data-bs-title="Dec base10"}) and base2 ([b2]{.tool data-bs-toggle="tooltip" data-bs-title="Dec base2"}) values.::::: {#tbl-b32}::: {.d-block .d-xl-none}|||||||||||---|----|-------|-|-|-|---|----|-------|| A | 0 | 00000 |||| N | 16 | 10000 || Á | 1 | 00001 |||| O | 17 | 10001 || B | 2 | 00010 |||| Ó | 18 | 10010 || C | 3 | 00011 |||| P | 19 | 10011 || D | 4 | 00100 |||| Q | 20 | 10100 || E | 5 | 00101 |||| R | 21 | 10101 || É | 6 | 00110 |||| S | 22 | 10110 || F | 7 | 00111 |||| T | 23 | 10111 || G | 8 | 01000 |||| U | 24 | 11000 || H | 9 | 01001 |||| Ú | 25 | 11001 || I | 10 | 01010 |||| V | 26 | 11010 || Í | 11 | 01011 |||| W | 27 | 11011 || J | 12 | 01100 |||| X | 28 | 11100 || K | 13 | 01101 |||| Y | 29 | 11101 || L | 14 | 01110 |||| Ý | 30 | 11110 || M | 15 | 01111 |||| Z | 31 | 11111 |:::::: {.d-none .d-xl-block}|||||||||||||||||||||||---|----|-------|-|-|-|---|----|-------|-|-|-|---|----|-------|-|-|-|---|----|-------|| A | 0 | 00000 |||| G | 8 | 01000 |||| N | 16 | 10000 |||| U | 24 | 11000 || Á | 1 | 00001 |||| H | 9 | 01001 |||| O | 17 | 10001 |||| Ú | 25 | 11001 || B | 2 | 00010 |||| I | 10 | 01010 |||| Ó | 18 | 10010 |||| V | 26 | 11010 || C | 3 | 00011 |||| Í | 11 | 01011 |||| P | 19 | 10011 |||| W | 27 | 11011 || D | 4 | 00100 |||| J | 12 | 01100 |||| Q | 20 | 10100 |||| X | 28 | 11100 || E | 5 | 00101 |||| K | 13 | 01101 |||| R | 21 | 10101 |||| Y | 29 | 11101 || É | 6 | 00110 |||| L | 14 | 01110 |||| S | 22 | 10110 |||| Ý | 30 | 11110 || F | 7 | 00111 |||| M | 15 | 01111 |||| T | 23 | 10111 |||| Z | 31 | 11111 |::::::::@tbl-b32 above shows that the [b32]{.tool data-bs-toggle="tooltip" data-bs-title="the Dec base32"} alphabet includes the 26 letters of the [English alphabet](https://en.wikipedia.org/wiki/English_alphabet#:~:text=a%20Latin%2Dscript%20alphabet%20consisting%20of%2026%C2%A0letters) and combines the 6 [vowels](https://en.wikipedia.org/wiki/Vowel#:~:text=a%20speech%20sound%20pronounced%20without%20any%20stricture%20in%20the%20vocal%20tract), a, e, i, o, u, and y, with [acute accents](https://en.wikipedia.org/wiki/Acute_accent#:~:text=a%20diacritic%20used%20in%20many%20modern%20written%20languages%20with%20alphabets%20based%20on%20the%20Latin%2C%20Cyrillic%2C%20and%20Greek%20scripts) ( ́) to create 6 additional letters, á, é, í, ó, ú, and ý, for a total of 32 letters. The 6 additional accented letters are included immediately after their unaccented antecedents as per the order of the English alphabet.::::: {.column-margin}::: {.hand #fingerbinarysvg}:::[[Wikimedia](https://commons.wikimedia.org/wiki/File:Hand_apaumy_couped.svg)]{.handlabel}::: {.hand #fingerbinarygif}:::[[Wikimedia](https://commons.wikimedia.org/wiki/File:Finger_binary.gif)]{.handlabel}:::::If we need more work days than those provided by Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"}, we can switch to the Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"}[M]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal M is decimal 15 or binary 01111"} Dec schedule by following Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"} on even numbered [p]{.tool data-bs-toggle="tooltip" data-bs-title="pentadays"} and Schedule [M]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal M is decimal 15 or binary 01111"} to odd numbered [p]{.tool data-bs-toggle="tooltip" data-bs-title="pentadays"}. Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"}[M]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal M is decimal 15 or binary 01111"} has 1 more work day than Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"} and provisions 255 work days per year without modifying the yearly transition shown in the Diagrams -@fig-zerocomm and -@fig-zeroleap above.Unlike weekly schedules, Dec schedules like Schedules [L]{.tool data-bs-toggle="tooltip" data-bs-title="L in base32 is 14 in base10 and 01110 in base2"} and [L]{.tool data-bs-toggle="tooltip" data-bs-title="L in base32 is 14 in base10 and 01110 in base2"}[M]{.tool data-bs-toggle="tooltip" data-bs-title="M in base32 is 15 in base10 and 01111 in base2"} provide a consistent🎯number of work days every year. While Days [364]{.tool data-bs-toggle="tooltip" data-bs-title="February 28"}, [365]{.tool data-bs-toggle="tooltip" data-bs-title="The last day of a Dec leap year"}, and [0]{.tool data-bs-toggle="tooltip" data-bs-title="March 1"} can be work or rest days in the Gregorian calendar️, these days are always rest days if we follow Schedules [L]{.tool data-bs-toggle="tooltip" data-bs-title="L in base32 is 14 in base10 and 01110 in base2"} or [L]{.tool data-bs-toggle="tooltip" data-bs-title="L in base32 is 14 in base10 and 01110 in base2"}[M]{.tool data-bs-toggle="tooltip" data-bs-title="M in base32 is 15 in base10 and 01111 in base2"}. Therefore, Schedules [L]{.tool data-bs-toggle="tooltip" data-bs-title="L in base32 is 14 in base10 and 01110 in base2"} and [L]{.tool data-bs-toggle="tooltip" data-bs-title="L in base32 is 14 in base10 and 01110 in base2"}[M]{.tool data-bs-toggle="tooltip" data-bs-title="M in base32 is 15 in base10 and 01111 in base2"} do not require any holidays to smooth the transition between years.There are 11 United States (US) [Federal holidays](https://www.opm.gov/policy-data-oversight/pay-leave/federal-holidays/). US Federal holidays that fall on a Gregorian calendar️ rest day, [Dow 0]{.tool data-bs-toggle="tooltip" data-bs-title="Sunday"} or [Dow 6]{.under .tool data-bs-toggle="tooltip" data-bs-title="Saturday"}, are observed on the nearest Gregorian calendar️ work day: [Dow 1]{.tool data-bs-toggle="tooltip" data-bs-title="Monday"} or [Dow 5]{.tool data-bs-toggle="tooltip" data-bs-title="Friday"}. Instead of applying this rule to Schedule [L]{.tool data-bs-toggle="tooltip" data-bs-title="duotrigesimal L is decimal 14 or binary 01110"} and moving holidays from [Dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"} 0 to 1, 4 to 3, 5 to 6, or 9 to 8, we can switch between Dec schedules as needed.The last US Federal holiday of the Gregorian calendar year is [Christmas](https://en.wikipedia.org/wiki/Christmas#:~:text=annual%20festival%20commemorating%20the%20birth%20of%20Jesus%20Christ)🎄. Even though it occurs on [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}299, which is the last day of [Hectoday]{.tool data-bs-toggle="tooltip" data-bs-title="hundreds of days"} 2 ([h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}2), Christmas is likely to be celebrated on [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}300, the first day of [Hectoday]{.tool data-bs-toggle="tooltip" data-bs-title="hundreds of days"} 3 ([h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}3), by people who do not use Dec and live in a UTC time zone with a negative offset. The Dec analog of the [holiday season](https://en.wikipedia.org/wiki/Christmas_and_holiday_season#:~:text=an%20annual%20period%20generally%20spanning%20from%20November%20or%20December%20to%20early%20January%20incorporating%20Christmas%20Day%20and%20New%20Year%27s%20Day) is [Hectoday]{.tool data-bs-toggle="tooltip" data-bs-title="hundreds of days"} -1 ([h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}[1]{.overline}). # Day of hectoday (doh) {#sec-doh}In addition to the four [astronomical seasons](https://en.wikipedia.org/wiki/Season#Astronomical), there are four Dec seasons which were chosen from two overlapping sets of four consecutive [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"} to match [daily global mean temperature](https://pulse.climate.copernicus.eu) patterns. The two sets called are "positive integer hectodays" ([pih]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer hectodays"}) and "negative integer hectodays" ([nih]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer hectodays"}). @eq-pih organizes [doy]{.tool data-bs-toggle="tooltip" data-bs-title="days of year"} into one of the four [pih]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer hectodays"}: [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}0, [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}1, [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}2, or [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}3.::: {.column-margin .overflowequation}$$\text{pih} = \left\lfloor\dfrac{\text{pid}}{100}\right\rfloor$$ {#eq-pih}$$\text{nih} = \left\lfloor\dfrac{\text{nid}}{100}\right\rfloor$$ {#eq-nih}:::Similarly, @eq-nih groups [doy]{.tool data-bs-toggle="tooltip" data-bs-title="days of year"} into one of the four [nih]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer hectodays"}: [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}[1]{.overline}, [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}[2]{.overline}, [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}[3]{.overline}, or [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}[4]{.overline}. In either case, the [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer days of year"} or [nid](#nid){.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} of a [doy]{.tool data-bs-toggle="tooltip" data-bs-title="days of year"} is divided by 100 and then [floored](https://en.wikipedia.org/wiki/Floor_and_ceiling_functions#:~:text=takes%20a%20real%20number%20x%20as%20input%20and%20returns%20the%20greatest%20integer%20less%20than%20or%20equal%20to%20x) to discard the [fractional part](https://en.wikipedia.org/wiki/Fractional_part#:~:text=The%20fractional%20part%20or,that%20number%27s%20integer%20part) of the [quotient](https://en.wikipedia.org/wiki/Quotient#:~:text=a%20quantity%20produced%20by%20the%20division%20of%20two%20numbers). In the [line](https://observablehq.com/plot/marks/line) plot below, the four Dec seasons, [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}0, [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}1, [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}2, and [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}[1]{.overline}, are labelled red, yellow, cyan, and violet, respectively, but [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}2 is truncated to remove its overlap with [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}[1]{.overline}.{{< include /dec/date/_season.qmd >}}The line plot shows how well the four Dec season match [ERA5](https://cds.climate.copernicus.eu/datasets/reanalysis-era5-single-levels?tab=overview#:~:text=the%20fifth%20generation%20ECMWF%20reanalysis%20for%20the%20global%20climate%20and%20weather%20for%20the%20past%208%20decades) daily global mean temperatures. If we think of the method for assigning [doy]{.tool data-bs-toggle="tooltip" data-bs-title="days of year"} to Dec seasons in @eq-season as a [statistical model](https://en.wikipedia.org/wiki/Statistical_model#:~:text=a%20mathematical%20model%20that%20embodies%20a%20set%20of%20statistical%20assumptions%20concerning%20the%20generation%20of%20sample%20data), its "[goodness of fit](https://en.wikipedia.org/wiki/Goodness_of_fit#:~:text=a%20statistical%20model%20describes%20how%20well%20it%20fits%20a%20set%20of%20observations)" is evidenced by the fact that the hottest [doy]{.tool data-bs-toggle="tooltip" data-bs-title="days of year"} on average, [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}149, is near the middle of [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}1 and the coldest [doy]{.tool data-bs-toggle="tooltip" data-bs-title="days of year"} on average, [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}[316]{.color316by365}, is close to the center of [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}[1]{.overline}.::: {.noscrollequation}$$\text{season} = \left\lfloor\dfrac{\text{pid} - \text{dyl} * [\text{nid} \ge -100]}{100}\right\rfloor$$ {#eq-season}:::In general, the hottest days are in [h]{.tool data-bs-toggle="tooltip" data-bs-title="group of one hundred days"}1, the coldest days are in [h]{.tool data-bs-toggle="tooltip" data-bs-title="group of one hundred days"}[1]{.overline}, temperatures increase with time in [h]{.tool data-bs-toggle="tooltip" data-bs-title="group of one hundred days"}0, and temperatures decrease with time in [h]{.tool data-bs-toggle="tooltip" data-bs-title="group of one hundred days"}2. Therefore, we can refer to [h]{.tool data-bs-toggle="tooltip" data-bs-title="group of one hundred days"}0, [h]{.tool data-bs-toggle="tooltip" data-bs-title="group of one hundred days"}1, [h]{.tool data-bs-toggle="tooltip" data-bs-title="group of one hundred days"}2, and [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}[1]{.overline} as the rise📈, [crest](https://en.wikipedia.org/wiki/Crest_and_trough#:~:text=is%20the%20highest%20point%20of%20the%20wave)🔥, fall📉, and [trough](https://en.wikipedia.org/wiki/Crest_and_trough#:~:text=lowest%20point%20of%20the%20wave)❄️, respectively, of global mean temperatures. @tbl-hoy below shows the Dec season names in the [Northern](https://en.wikipedia.org/wiki/Northern_Hemisphere#:~:text=half%20of%20Earth%20that%20is%20north%20of%20the%20equator) and [Southern](https://en.wikipedia.org/wiki/Southern_Hemisphere#:~:text=Earth%20that%20is-,south%20of%20the%20equator,-.%20It%20contains%20all)[Hemispheres](https://en.wikipedia.org/wiki/Hemispheres_of_Earth#:~:text=any%20division%20of%20the%20globe%20into%20two%20equal%20halves). ::: {#tbl-hoy .overflowtable}| Hemisphere | h0 | h1 | h2 | h[1]{.overline} || ----------| --------| --------| --------| --------|| Northern | Spring | Summer | Autumn | Winter || Southern | Autumn | Winter | Spring | Summer |:::The remainder after dividing a [doy](#doy){.tool data-bs-toggle="tooltip" data-bs-title="day of year"} is a "day of hectoday" ([doh](#doh){#dayofhectoday .tool data-bs-toggle="tooltip" data-bs-title="day of hectoday"}), which essentially is the percent of a [pih]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer hectoday"} that has passed if the dividend is a [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"}, the percent of a [nih]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer hectoday"} that remains if the dividend is a [nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"}, the percent of a [pih]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer hectoday"} that is left if the dividend is a [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} that is equal to a [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"}, or the percent of a [nih]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer hectoday"} that has passed if the dividend is a [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} which is equal to a [nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"}.::: {.column-margin .overflowequation}$$\text{doh} = \text{doy} \href{https://en.wikipedia.org/wiki/Modulo#:~:text=returns%20the%20remainder%20or%20signed%20remainder%20of%20a%20division}{\bmod} 100$$ {#eq-doh}:::To highlight an [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"} and [doh](#doh){.tool data-bs-toggle="tooltip" data-bs-title="day of hectoday"}, we can use a three digit [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} with a vinculum over either the first digit or the last two digits. If its vinculum is above only its first digit, the current three-digit [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} is equal to the the current [nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} and signals that h\${decNih} is \${decDohNid}% done: [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} = [nih]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer hectoday"}. If its vinculum is over its last two digits, the current three-digit [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} is equal to the current [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} and indicates that h\${decPih} is \${decDohPid}% unfinished: [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} = [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"}.We can also use [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} to draw attention to the current [x]{.tool data-bs-toggle="tooltip" data-bs-title="groups of ten days"}. If its vinculum is above its first two digit, the current [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} is equal to the the current [nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} and signals that h\${decNih} is \${decDohNid}% done: [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} = [nih]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer hectoday"}. If its vinculum is over only its last digit, the current [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} is equal to the current [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} and indicates that h\${decPih} is \${decDohPid}% unfinished: [mid]{.tool data-bs-toggle="tooltip" data-bs-title="mixed integer day of year"} = [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"}.The connection between [pid](#pid){.tool data-bs-toggle="tooltip" data-bs-title="positive integer days of year"} and seasonal temperature changes requires [pid](#pid){.tool data-bs-toggle="tooltip" data-bs-title="positive integer days of year"} to reset after d[1]{.overline}. If we do not need to visually keep track of years, [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"}, [doh](#doh){.tool data-bs-toggle="tooltip" data-bs-title="day of hectoday"}, months, [dom]{.tool data-bs-toggle="tooltip" data-bs-title="day of month"}, [x]{.tool data-bs-toggle="tooltip" data-bs-title="groups of ten days"}, [dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"}, weeks, [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}, [p](#p){#pentaday .tool data-bs-toggle="tooltip" data-bs-title="pentadays"}, or [dop]{.tool data-bs-toggle="tooltip" data-bs-title="days of pentaday"}, we can translate a a Dec year+day date into a single integer called a "day of [era](https://en.wikipedia.org/wiki/Calendar_era#:~:text=the%20period%20of%20time%20elapsed%20since%20one%20epoch%20of%20a%20calendar)" ([doe]{.tool data-bs-toggle="tooltip" data-bs-title="day of era"}).Every [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"} belongs to one [pih]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer hectoday"}, one [nih]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer hectoday"}, one "positive integer xun" ([pix]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer xun"}), and one "negative integer xun" ([nix]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer xun"}). In total, that is two [h]{.tool data-bs-toggle="tooltip" data-bs-title="groups of one hundred days"} and two [x]{.tool data-bs-toggle="tooltip" data-bs-title="groups of ten days"} per [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"}. # Day of era (doe) {#sec-doe}Dec refers to midnight on [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}[0]{.color0} as the "beginning of year" ([boy]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of year"}). At the [boy]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of year"}, the [pid](#pid){.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} [rolls over](https://en.wikipedia.org/wiki/Rollover#:~:text=the%20act%20of%20a%20counter%20restarting%20its%20count%20sequence) from [364]{.color364by365} or [365]{.color365by366} to [0]{.color0}. If the [nid](#nid){.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} did not reset to [-365]{.color0} or [-366]{.color0} at the [boy]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of year"}, it would continue from -1 to 0 and thus become a [pid](#pid){.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"}. The [doe]{.tool data-bs-toggle="tooltip" data-bs-title="day of era"} is like a [nid](#nid){.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"} that became a [pid](#pid){.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} at the "beginning of era" ([boe]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of era"}), midnight on [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}[0]{.color0} of Year [0]{.color0} (y[0]{.color0}), and never restarted before or after the [boe]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of era"}.Each of the ten Dec time zones has its own [boe]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of era"}, [doe]{.tool data-bs-toggle="tooltip" data-bs-title="day of era"}, [boy]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of year"}, and [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"}. The [boe]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of era"} of the Zone 0 Dec time zone is called the Dec [epoch](https://en.wikipedia.org/wiki/Epoch#:~:text=an%20instant%20in%20time%20chosen%20as%20the%20origin%20of%20a%20particular%20calendar%20era). We can convert [Julian day numbers](https://en.wikipedia.org/wiki/Julian_day#:~:text=a%20continuous%20count%20of%20days%20from%20the%20beginning%20of%20the%20Julian%20period) ([JDN]{.tool data-bs-toggle="tooltip" data-bs-title="Julian day numbers"}) to Zone 0 [doe]{.tool data-bs-toggle="tooltip" data-bs-title="days of era"} by subtracting the number of full days in between the start of the [Julian period](https://en.wikipedia.org/wiki/Julian_day#Terminology:~:text=a%20chronological%20interval%20of%207980%C2%A0years) and the Dec epoch, which is 1721119 if the Zone 0 time is later than noon and 1721120 otherwise.Dec uses [doe]{.tool data-bs-toggle="tooltip" data-bs-title="days of era"} for [calendrical calculations](https://en.wikipedia.org/wiki/Calendrical_calculation#:~:text=a%20calculation%20concerning%20calendar%20dates), such as finding the [POSIX](https://en.wikipedia.org/wiki/POSIX#:~:text=a%20family%20of%20standards%20specified%20by%20the%20IEEE%20Computer%20Society%20for%20maintaining%20compatibility%20between%20operating%20systems)[zero-based [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}](https://pubs.opengroup.org/onlinepubs/007904875/utilities/date.html#:~:text=weekday%20as%20a%20decimal%20number%20%5B0%2C6%5D%20(0%3Dsunday)) of a given date. This year, the [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} of [Christmas](https://en.wikipedia.org/wiki/Christmas#:~:text=annual%20festival%20commemorating%20the%20birth%20of%20Jesus%20Christ)🎄is \${xmasDotw} according to @eq-dow: (\${xmasDote} + \${3 - nOffInput}) [mod](https://en.wikipedia.org/wiki/Modulo#:~:text=returns%20the%20remainder) 7 = \${xmasDotw}. Unlike [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}, the [dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"} can be found without much effort, because it is the last digit of the [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} or equivalently the remainder after dividing the [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} by 10 as per @eq-dox.::: {.column-margin .noscrollequation}$$\text{dow} = (\text{doe} + 3) \href{https://en.wikipedia.org/wiki/Modulo#:~:text=returns%20the%20remainder%20or%20signed%20remainder%20of%20a%20division}{\bmod} 7$$ {#eq-dow}$$\text{dox} = \text{pid} \href{https://en.wikipedia.org/wiki/Modulo#:~:text=returns%20the%20remainder%20or%20signed%20remainder%20of%20a%20division}{\bmod} 10$$ {#eq-dox}:::@eq-dow is derived from [Howard Hinnant](https://howardhinnant.github.io)'s [`weekday_from_days`](https://howardhinnant.github.io/date_algorithms.html#weekday_from_days) algorithm. The Dec epoch [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} is 3 = (0 + 3) [mod](https://en.wikipedia.org/wiki/Modulo#:~:text=returns%20the%20remainder) 7. The [UNIX epoch](https://en.wikipedia.org/wiki/Unix_time#:~:text=00%3A00%3A00%20UTC%20on%201%C2%A0January%201970)[dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} is 4 = (719468 + 3) [mod](https://en.wikipedia.org/wiki/Modulo#:~:text=returns%20the%20remainder) 7. Depending on how [mod](https://en.wikipedia.org/wiki/Modulo#:~:text=returns%20the%20remainder) is [defined](https://en.wikipedia.org/wiki/Modulo#Variants_of_the_definition), a negative [doe]{.tool data-bs-toggle="tooltip" data-bs-title="day of era"} could yield a negative [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}: -1 = (-60 + 3) [mod](https://en.wikipedia.org/wiki/Modulo#:~:text=returns%20the%20remainder) 7. We can add 7 to a negative [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} in the bottom row of @tbl-dow to turn it into the positive [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} above it.::: {#tbl-dow .overflowtable}|| Sun | Mon | Tue | Wed | Thu | Fri | Sat || -----------| ---| ---| ---| ---| ---| ---| ---||[+]{.mono} | 0 | 1 | 2 | 3 | 4 | 5 | 6 ||[-]{.mono} | 7 | 6 | 5 | 4 | 3 | 2 | 1 |:::Christmas is an anchored⚓️holiday because it occurs on the same [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} every year. In contrast, floating🛟holidays like [Thanksgiving](https://en.wikipedia.org/wiki/Thanksgiving#:~:text=Thanksgiving%20is-,a%20national%20holiday,-celebrated%20on%20various)🦃are always planned for the same [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} and thus can fall on various [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer days of year"}. We can use @eq-dowdif, which is inspired by [Howard Hinnant](https://howardhinnant.github.io)'s [`weekday_difference`](https://howardhinnant.github.io/date_algorithms.html#weekday_difference) algorithm, to find the floating holiday date associated with a given year.$$\text{dow}_\Delta = (\text{dow}_\text{M} - \text{dow}_\text{S} + 7) \href{https://en.wikipedia.org/wiki/Modulo#:~:text=returns%20the%20remainder%20or%20signed%20remainder%20of%20a%20division}{\bmod} 7$$ {#eq-dowdif}In @eq-dowdif, [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}~M~ is the [minuend](https://en.wiktionary.org/wiki/minuend#:~:text=A%20number%20or%20quantity%20from%20which%20another%20is%20to%20be%20subtracted), [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}~S~ is the [subtrahend](https://en.wikipedia.org/wiki/Subtraction#:~:text=number%20being%20subtracted), and [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}~Δ~ is the [difference](https://en.wikipedia.org/wiki/Subtraction#Notation_and_terminology:~:text=The%20result%20is%20the%20difference) between them that ranges from 0 to 6. To get the [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} of the first [Dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} [4]{.tool data-bs-toggle="tooltip" data-bs-title="Thursday"} after [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}[266]{}, which is Thanksgiving in the United States🇺🇸and Brazil🇧🇷, we plug 4 as [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}~M~ and the [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} of [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}[267]{} as [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}~S~ into @eq-dowdif, \${day266dotwDiff} = (4 [-]{.mono} \${day266dotw} + 7) [mod](https://en.wikipedia.org/wiki/Modulo#:~:text=returns%20the%20remainder) 7, and then add 267: \${day266dotwDiff + 267} = \${day266dotwDiff} + 267.::: {.callout-warning}# Bad Pun Alert[**Deck**aday the halls](https://en.wikipedia.org/wiki/Deck_the_Halls#:~:text=a%20traditional%20Christmas%20carol.) with [**dows**]{.tool data-bs-toggle="tooltip" data-bs-title="days of week"} of holly! Fa + la × 8! 'Tis the **[hectoday]{.tool data-bs-toggle="tooltip" data-bs-title="hundred days"}** to be jolly! Aren't you thankful that I couldn’t *thank* of a Thanksgiving pun?:::# Year of era (yoe) {#sec-yoe}Almost all of the equations above depend on the [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"}. Most often, the [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} is calculated using Equations -@eq-yoe2coe, -@eq-yoe2yoc, and -@eq-doe, which are based on the [`days_from_civil`](https://howardhinnant.github.io/date_algorithms.html#days_from_civil){.mono .under} algorithm created by [Howard Hinnant](https://howardhinnant.github.io) and described in his manuscript entitled [[`chrono`]{.mono .under}-Compatible Low-Level Date Algorithms](https://howardhinnant.github.io/date_algorithms.html) -@hinnant2021date, to convert the two components of a Dec date, namely a "year of era" ([yoe]{.tool data-bs-toggle="tooltip" data-bs-title="year of era"}) and a [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"}, into a [doe]{.tool data-bs-toggle="tooltip" data-bs-title="day of era"}.$$\text{coe} = \Biggl \lfloor \frac{\begin{cases}\text{yoe}&{\text{if } \text{yoe} \geq 0;}\\\text{yoe}-399&{\text{otherwise.}}\end{cases}}{400} \Biggr \rfloor$$ {#eq-yoe2coe}$$\text{yoc} = \text{yoe} - \text{coe} \ast 400$$ {#eq-yoe2yoc}:::{.overflowequation}$$\text{doc} = \text{yoc} \ast 365 + \lfloor\frac{\text{yoc}}{4}\rfloor - \lfloor\frac{\text{yoc}}{100}\rfloor + \text{pid}$$ {#eq-date2doc}:::$$\text{doe} = \text{coe} \ast 146097 + \text{doc}$$ {#eq-doe}The Dec date equations are the [inverse](https://en.wikipedia.org/wiki/Inverse#:~:text=Inverse%20function%2C-,a%20function%20that%20%22reverses%22%20another%20function,-Generalized%20inverse%2C%20a)🔁of the Dec [doe]{.tool data-bs-toggle="tooltip" data-bs-title="day of era"} equations above, based on Howard Hinnant's [`civil_from_days`](https://howardhinnant.github.io/date_algorithms.html#civil_from_days){.mono} algorithm, and useful for obtaining Dec dates from [doe]{.tool data-bs-toggle="tooltip" data-bs-title="days of era"}, [UNIX timestamps](https://en.wikipedia.org/wiki/Unix_time#:~:text=the%20number%20of%20seconds%20that%20have%20elapsed%20since%2000%3A00%3A00%20UTC%20on%201%C2%A0January%201970), and [JDN]{.tool data-bs-toggle="tooltip" data-bs-title="Julian day numbers"}. Along the way to obtaining a [yoe]{.tool data-bs-toggle="tooltip" data-bs-title="year of era"} and [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} from a [doe]{.tool data-bs-toggle="tooltip" data-bs-title="day of era"}, the Dec date equations calculate the "[cycle](https://en.wikipedia.org/wiki/Solar_cycle_(calendar)#:~:text=the%20Gregorian%20cycle%20of%20400%20years%20has%20exactly%20146%2C097%20days%2C%20i.e.%20exactly%2020%2C871%20weeks%2C%20one%20can%20say%20that%20the%20Gregorian%20so%2Dcalled%20solar%20cycle%20lasts%20400%20years) of era" ([coe]{.tool data-bs-toggle="tooltip" data-bs-title="cycle of era"}), "year of cycle" ([yoc]{.tool data-bs-toggle="tooltip" data-bs-title="year of cycle"}), and "day of cycle" ([doc]{.tool data-bs-toggle="tooltip" data-bs-title="day of cycle"}).$$\text{coe} = \Biggl \lfloor \frac{\begin{cases}\text{doe}&{\text{if } \text{doe} \geq 0;}\\\text{doe}-146096&{\text{otherwise.}}\end{cases}}{146097} \Biggr \rfloor$$ {#eq-doe2coe}$$\text{doc} = \text{doe} - \text{coe} \ast 146097$$ {#eq-doe2doc}$$\text{yoc} = \biggl \lfloor \frac{\text{doc} - \lfloor \frac{\text{doc}}{1460} \rfloor + \lfloor \frac{\text{doc}}{36524} \rfloor - \lfloor \frac{\text{doc}}{146096} \rfloor}{365} \biggr \rfloor$$ {#eq-doe2yoc}$$\text{yoe} = \text{yoc} + \text{coe} \ast 400$$ {#eq-yoe}$$\text{pid} = \biggl \lfloor \text{doc} - \text{yoc} \ast 365 - \lfloor \frac{\text{yoc}}{4} \rfloor + \lfloor \frac{\text{yoc}}{100} \rfloor \biggr \rfloor$$ {#eq-doe2pid}Dates generated by the Dec date equations are guaranteed to be in the standard [yoe]{.tool data-bs-toggle="tooltip" data-bs-title="year of era"}+[pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} format. Therefore, we can standardize Dec dates by using the Dec [doe]{.tool data-bs-toggle="tooltip" data-bs-title="day of era"} and date equations consecutively to perform a [round-trip](https://en.wikipedia.org/wiki/Round-trip_format_conversion#:~:text=converting%20from%20any%20data%20representation%20and%20back%20again) "date to [doe]{.tool data-bs-toggle="tooltip" data-bs-title="day of era"} to date" conversion and thus ensure that the [yoe]{.tool data-bs-toggle="tooltip" data-bs-title="year of era"} is an integer and the [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} is a positive integer less than the [dyl]{.tool data-bs-toggle="tooltip" data-bs-title="Decalendar year length"}: 0 ≤[pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} <[dyl]{.tool data-bs-toggle="tooltip" data-bs-title="Decalendar year length"}. # Day of week (dow) {#sec-dow}Even though Decalendar functions best with [x]{.tool data-bs-toggle="tooltip" data-bs-title="groups of ten days"}, Dec dates can display [dow]{.tool data-bs-toggle="tooltip" data-bs-title="days of week"} by splitting a [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} into a "beginning of week" ([bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of week"}) and the POSIX zero-based [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}. To obtain the [bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of week"}, we subtract the [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} from the [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"}: [bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of week"} = [pid]{.tool data-bs-toggle="tooltip" data-bs-title="positive integer day of year"} [-]{.mono} [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}. According to the current Zone [0]{.color0} [[yoe]{.tool data-bs-toggle="tooltip" data-bs-title="year of era"}+[bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of week"}+[dow]{.tool data-bs-toggle="tooltip" data-bs-title="days of week"}]{.nowrap} date, [\${decYear}[\${dotw0sign}]{.mono}\${dotw0dotyPad}+\${dotw}]{.nowrap}, the most recent [Dow]{.tool data-bs-toggle="tooltip" data-bs-title="days of week"} [0]{.color0} was on [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}\${dotw0doty} and today is [Dow]{.tool data-bs-toggle="tooltip" data-bs-title="days of week"} \${dotw}.:::{.overflowequation}$$\text{yoe} + \frac{\text{pid}}{\text{dyl}} = \text{yoe} + \frac{\text{bow + dow}}{\text{dyl}}$$ {#eq-bow}:::A Dec [bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of week"} date can have a countup or a countdown [bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of week"}. The countdown equivalent of [\${decYear}[\${dotw0sign}]{.mono}\${dotw0dotyPad}+\${dotw}]{.nowrap} is [\${nextYear}[-]{.mono}\${dotw0dotyNegPad}+\${dotw}]{.nowrap}. Like [nid]{.tool data-bs-toggle="tooltip" data-bs-title="negative integer day of year"}, countdown [bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of week"} can be useful for calculations. We can add up to 52 weeks to any countdown [bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of week"} without having to take into account the length of the year. The sum of 52 weeks and the last [bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of week"}+[dow]{.tool data-bs-toggle="tooltip" data-bs-title="days of week"} of this year is 52 × 7 + ${-decYearLastBowNeg} + \${decYearLastDow} = \${decYearLastBowSum} + \${decYearLastDow}.Based on the calculation above, the Dec [bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of week"} date that is 52 weeks after [\${nextYear}[-]{.mono}\${decYearLastBowNegPad}[+]{.mono}\${decYearLastDow}]{.nowrap} is [\${nextYear}[+]{.mono}\${decYearLastBowSumPad}[+]{.mono}\${decYearLastDow}]{.nowrap}. When we see the same [dow]{.tool data-bs-toggle="tooltip" data-bs-title="days of week"} in two dates, we know that difference between them is a multiple of 7. The [bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of week"} can be used to refer to the current week in phrases like "the week of [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}\${dotw0doty}" or "the week that begins with [d]{.tool data-bs-toggle="tooltip" data-bs-title="day"}\${dotw0doty}" and thus can function like a [woy]{.tool data-bs-toggle="tooltip" data-bs-title="week of year"}.# Week of year (woy) {#sec-woy}We can convert between the [[bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of week"}+[dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}]{.nowrap} in Dec [bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of week"} dates and the [7×[woy]{.tool data-bs-toggle="tooltip" data-bs-title="week of year"}+[dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}[-]{.mono}[boy]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of year"}[dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}]{.nowrap} in Dec [woy]{.tool data-bs-toggle="tooltip" data-bs-title="week of year"} dates. The [boy]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of year"}[dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} is the [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} of the first day of the Dec year. To obtain the current [woy]{.tool data-bs-toggle="tooltip" data-bs-title="week of year"}, we sum the [boy]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of year"}[dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} with the current [bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of week"} and then divide by 7: \${week} = (\${doty0dotw} + \${dotw0doty}) ÷ 7. Dec truncates [woy]{.tool data-bs-toggle="tooltip" data-bs-title="week of year"} dates so that they only display the [yoe]{.tool data-bs-toggle="tooltip" data-bs-title="year of era"}, [woy]{.tool data-bs-toggle="tooltip" data-bs-title="week of year"}, and [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}: \${decYear}[+]{.mono}\${weekPad}[+]{.mono}\${dotw}.:::{.overflowequation}$$\text{yoe} + \frac{\text{bow + dow}}{\text{dyl}} = \text{yoe} + \frac{7\ast\text{woy + dow}-\text{boydow}}{\text{dyl}}$$ {#eq-woy}:::If [dow]{.tool data-bs-toggle="tooltip" data-bs-title="days of week"} were like [doy]{.tool data-bs-toggle="tooltip" data-bs-title="days of year"} and reset at the [boy]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of year"}, the [boy]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of year"}[dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} would always be zero and conversion between [woy]{.tool data-bs-toggle="tooltip" data-bs-title="week of year"} and [bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of week"} dates would be straightforward but the reality is that we need the [boy]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of year"}[dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} to convert a [woy]{.tool data-bs-toggle="tooltip" data-bs-title="week of year"} date to a [bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of week"} date. Dec pads the left side of the [woy]{.tool data-bs-toggle="tooltip" data-bs-title="week of year"} and [bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of week"} in dates with zeros so that we can distinguish between two-digit [woy]{.tool data-bs-toggle="tooltip" data-bs-title="weeks of year"} and three-digit [bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginnings of week"}. To find the [boy]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of year"}[dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}, we first divide the [bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginnings of week"} by 7 and subtract the remainder from 7. Then, we divide the resulting difference by 7 and keep the remainder. We could also get the [boy]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of year"}[dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} without a [bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginnings of week"} by turning the [yoe]{.tool data-bs-toggle="tooltip" data-bs-title="year of era"} into a [doe]{.tool data-bs-toggle="tooltip" data-bs-title="day of era"} and then the [doe]{.tool data-bs-toggle="tooltip" data-bs-title="day of era"} into a [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}. Dec [woy]{.tool data-bs-toggle="tooltip" data-bs-title="week of year"} dates obfuscate🫣[doy]{.tool data-bs-toggle="tooltip" data-bs-title="days of year"} much more than [bow]{.tool data-bs-toggle="tooltip" data-bs-title="beginning of week"} dates, but may be useful for [week-based accounting](https://en.wikipedia.org/wiki/Accounting_period#52%E2%80%9353-week_fiscal_year:~:text=used%20by%20companies%20that%20desire%20that%20their%20fiscal%20year%20always%20end%20on%20the%20same%20day%20of%20the%20week)🧾.:::{.overflowequation}$$\text{boydow = (7} - \text{bow}\href{https://en.wikipedia.org/wiki/Modulo#:~:text=returns%20the%20remainder%20or%20signed%20remainder%20of%20a%20division}{\bmod}7)\href{https://en.wikipedia.org/wiki/Modulo#:~:text=returns%20the%20remainder%20or%20signed%20remainder%20of%20a%20division}{\bmod}7$$ {#eq-boydow}:::# Day of month (dom) {#sec-dom}Dec dates can be expanded to display Dec month and [POSIX [dom]{.tool data-bs-toggle="tooltip" data-bs-title="day of month"}](https://pubs.opengroup.org/onlinepubs/007904875/utilities/date.html#:~:text=day%20of%20the%20month%20as%20a%20decimal%20number%20%5B01%2C31%5D) numbers. The current Dec [dom]{.tool data-bs-toggle="tooltip" data-bs-title="day of month"} date is \${decYear}+\${monthNumber1}+\${dotm}. Dec month numbers are the last [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"} of the previous month because POSIX [dom]{.tool data-bs-toggle="tooltip" data-bs-title="days of month"} are one-based. For zero-based [dom]{.tool data-bs-toggle="tooltip" data-bs-title="days of month"}, Dec represents each month with its first [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"}: \${decYear}+\${monthNumber0}+\${dotm0}. This way, Dec can support both zero- and one-based [dom]{.tool data-bs-toggle="tooltip" data-bs-title="days of month"}.Dec [dom]{.tool data-bs-toggle="tooltip" data-bs-title="day of month"} dates replace the [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"} d from Dec dates with d-m+m. We evaluate the subtraction to get d[-]{.mono}m, the Dec month number, but not the addition, so we can see m, the [dom]{.tool data-bs-toggle="tooltip" data-bs-title="day of month"}. If we combine the [dom]{.tool data-bs-toggle="tooltip" data-bs-title="day of month"} and [dow]{.under .tool data-bs-toggle="tooltip" data-bs-title="day of week"} patterns above, we can create hybrid [dom]{.tool data-bs-toggle="tooltip" data-bs-title="day of month"}+[dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} Dec dates: \${decYear}+\${hybridMonthWeekPad}+\${dotm}+\${dotw}, where \${hybridMonthWeek} is d[-]{.mono}m[-]{.mono}w, the [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"} of the last [Dow 0]{.tool data-bs-toggle="tooltip" data-bs-title="Sunday"} before the beginning of the month.We can obtain Dec month numbers using only a pair of hands🤲by counting index☝️and ring💍fingers as 30 days and other fingers as 31 days. For zero-based [dom]{.tool data-bs-toggle="tooltip" data-bs-title="days of month"}, we start counting from 0. For one-based [dom]{.tool data-bs-toggle="tooltip" data-bs-title="days of month"}, we start counting from -1, as shown in the image below. To spread 12 months across 10 fingers, the first and last fingers each represent 2 months.:::{.hand}:::[[Wikimedia](https://commons.wikimedia.org/wiki/File:Typing-colour_for-finger-positions.svg)]{.handlabel}The finger🖐[mnemonic](https://en.wikipedia.org/wiki/Mnemonic#:~:text=any%20learning%20technique%20that%20aids%20information%20retention%20or%20retrieval%20in%20the%20human%20memory) described above is similar to the [knuckle👊](https://en.wikipedia.org/wiki/Knuckle_mnemonic#:~:text=a%20mnemonic%20device%20for%20remembering%20the%20number%20of%20days%20in%20the%20months%20of%20the%20Julian%20and%20Gregorian%20calendars)and [musical keyboard🎹](https://en.wikipedia.org/wiki/Month#:~:text=this%20cyclical%20pattern%20of%20month%20lengths%20matches%20the%20musical%20keyboard%20alternation%20of%20wide%20white%20keys%20(31%20days)%20and%20narrow%20black%20keys%20(30%20days))mnemonics. These mnemonics attempt to make sense of the irregular pattern of [month lengths](https://en.wikipedia.org/wiki/Month#:~:text=Name-,Number,of%20days) in the Gregorian calendar️. As opposed to months, we do not need mnemonics, tables, or mental calculations to use [x]{.tool data-bs-toggle="tooltip" data-bs-title="groups of ten days"}, because all of the required information is plainly visible in the [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"}.# Month of year (moy) {#sec-moy}To convert [doy]{.tool data-bs-toggle="tooltip" data-bs-title="days of year"} to or from [POSIX month](https://pubs.opengroup.org/onlinepubs/007904875/utilities/date.html#:~:text=Month%20as%20a%20decimal%20number%20%5B01%2C12%5D) and [dom]{.tool data-bs-toggle="tooltip" data-bs-title="day of month"} numbers, we can use the month of year ([moy]{.tool data-bs-toggle="tooltip" data-bs-title="month of year"}) equations from the [`civil_from_days`](https://howardhinnant.github.io/date_algorithms.html#civil_from_days){.mono .under} and [`days_from_civil`](https://howardhinnant.github.io/date_algorithms.html#days_from_civil){.mono .under} algorithms. Unlike POSIX month numbers, [moy]{.tool data-bs-toggle="tooltip" data-bs-title="months of year"} are zero-based and start from [Moy 0]{.tool data-bs-toggle="tooltip" data-bs-title="March"} instead of [Moy 10]{.tool data-bs-toggle="tooltip" data-bs-title="January"}. As shown in the first [moy]{.tool data-bs-toggle="tooltip" data-bs-title="month of year"} equation below, we can obtain a [moy]{.tool data-bs-toggle="tooltip" data-bs-title="month of year"} from a [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"} or a POSIX month number.:::{.overflowequation}$$\text{moy} = (5 \ast \text{doy} + 2) \div 153 = \begin{cases}\text{month}-3&{\text{if }\text{month}\gt 2;}\\\text{month}+9&{\text{otherwise.}}\end{cases}$$ {#eq-moy}:::$$\text{month} = \begin{cases}\text{moy}+3&{\text{if }\text{moy}\lt 10;}\\\text{moy}-9&{\text{otherwise.}}\end{cases}$$ {#eq-mon}$$\text{dom} = \text{doy} - (153 \ast \text{moy} + 2) \div 5 + 1$$ {#eq-dom}$$\text{doy} = (153 \ast \text{moy}+ 2) \div 5 + \text{dom} - 1$$ {#eq-doy}A [moy]{.tool data-bs-toggle="tooltip" data-bs-title="month of year"} and its equivalent POSIX month number differ by 9 in Moy [10]{.tool data-bs-toggle="tooltip" data-bs-title="January"} or [11]{.tool data-bs-toggle="tooltip" data-bs-title="February"} and -3 in any other [moy]{.tool data-bs-toggle="tooltip" data-bs-title="month of year"} because the Dec epoch, [0000]{.color0}+[000]{.color0}, is 2 months later than the Gregorian calendar epoch: -0001+306. To convert years, we add 1 to the yoe and subtract 1 from the Gregorian calendar️ common era year (cey) if the [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"} is greater than 305, the [moy]{.tool data-bs-toggle="tooltip" data-bs-title="month of year"} is greater than 9, or the month is less than 3::::{.overflowequation}$$\text{yoe} = \begin{cases}\text{cey}-1&{\text{if }\text{doy}\gt 305\href{https://en.wikipedia.org/wiki/Logical_disjunction}{\lor}\text{moy}\gt 9\href{https://en.wikipedia.org/wiki/Logical_disjunction}{\lor}\text{month}\lt 3;}\\\text{cey}&{\text{otherwise.}}\end{cases}$$ {#eq-decyear}$$\text{cey} = \begin{cases}\text{yoe}+1&{\text{if }\text{doy}\gt 305\href{https://en.wikipedia.org/wiki/Logical_disjunction}{\lor}\text{moy}\gt 9\href{https://en.wikipedia.org/wiki/Logical_disjunction}{\lor}\text{month}\lt 3;}\\\text{yoe}&{\text{otherwise.}}\end{cases}$$ {#eq-gregyear}:::# Summary {.unnumbered #tldr}This article describes Dec and how it can interoperate with the Gregorian calendar by minuend expanding Dec dates into [dom]{.tool data-bs-toggle="tooltip" data-bs-title="day of month"} and [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} dates or dividend expanding [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"} dates into [woy]{.tool data-bs-toggle="tooltip" data-bs-title="week of year"} dates. On its own, Dec minuend expands dates into span equivalents, but has no use for dividend expansion, because [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"} display [x]{.tool data-bs-toggle="tooltip" data-bs-title="groups of ten days"} and [dox]{.tool data-bs-toggle="tooltip" data-bs-title="days of xún"} without any expansion.@fig-conv below visualizes the conversion of the UNIX epoch Dec date [1969]{.color069}+[306]{.colord306} into a Gregorian calendar️year, month, [dom]{.tool data-bs-toggle="tooltip" data-bs-title="day of month"} and [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}. To obtain its associated [dow]{.tool data-bs-toggle="tooltip" data-bs-title="day of week"}, we first need to convert a Dec date into a [doe]{.tool data-bs-toggle="tooltip" data-bs-title="day of era"}. Outside of its interoperability with the Gregorian calendar️, Dec converts dates into [doe]{.tool data-bs-toggle="tooltip" data-bs-title="days of era"} to find the number of days in between two dates.::: {#fig-conv}```{mermaid}%%{init: {'theme': 'default', 'themeVariables': { 'fontSize': '20px'}}}%%flowchart LR L~~~Y L-->Y L-->D L-->E R-->Y M---R[ ]:::empty D---A D~~~B[ ]:::empty A-->G G---R Y~~~L[ ]:::empty Y---A[ ]:::empty Y~~~A B-->M B~~~N B-->N B-->D B~~~D N~~~B E-->W subgraph decdate[Decalendar] Y[yoe<br>1969] D[doy<br>306] E[doe<br>719468] end subgraph gregdate[Gregorian calendar] W[dow<br>4] G[year<br>1970] M[month<br>1] N[dom<br>1] end classDef empty width:0px; click E "#doe" click W "#dow" click Y "#yoe" click D "#doy" click G "#eya" click M "#moy" click N "#dom"```:::For simplicity, the flowchart above does not show conversion byproducts, such as the [coe]{.under .tool data-bs-toggle="tooltip" data-bs-title="cycle of era"}, [yoc]{.tool data-bs-toggle="tooltip" data-bs-title="year of cycle"}, and [doc]{.tool data-bs-toggle="tooltip" data-bs-title="day of cycle"} generated during Dec [doe]{.tool data-bs-toggle="tooltip" data-bs-title="day of era"} to date conversion or the [moy]{.tool data-bs-toggle="tooltip" data-bs-title="months of year"} that we need in order to split a [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"} into a month and a [dom]{.tool data-bs-toggle="tooltip" data-bs-title="day of month"} or combine a month and a [dom]{.tool data-bs-toggle="tooltip" data-bs-title="day of month"} into a [doy]{.tool data-bs-toggle="tooltip" data-bs-title="day of year"}. The arrows in the flowchart represent equations adapted from [[`chrono`]{.mono .under}-Compatible Low-Level Date Algorithms](https://howardhinnant.github.io/date_algorithms.html).Instead of converting Dec dates, we can expand them to view the information we need as part of the math-inspired notation of Dec. At its heart❤️, Dec is a simple system that uses only years and days for time measurement. Thanks to Dec expansion, Dec can work with other units. In this way, Dec expansion bridges the gap between the Dec and Gregorian calendars.# Next {.unnumbered #next}After reading this article, you should be able to understand the examples in my [filter](/quarto/filter), [include](/quarto/include), and [script](/quarto/script) articles, but you may want to start with my [Quarto article](/quarto). To see the full extent of the benefits that Dec provides, I recommend that you continue through the [Dec section](/dec) of my site to the [time](/dec/time, [snap](/dec/snap, and [span](/dec/span)🌈articles. Dec has a lot more to offer than just dates!:::{.datenav #fig-btmdatenav}{{< include /asset/_decquanav.qmd >}}:::In addition my Dec and Quarto articles, many other articles on my site discuss Dec. Notably, my [Jupyter](/jupyter) article compares the code underlying Dec in several programming languages, my [Reveal](/reveal) article features a presentation on Dec time measurement, and my [Observable](/observable) article describes how I demonstrate Dec in action with interactive and animated visualizations.Thank you for your interest in Dec. You will find citation information for this article below. Please note that the original source of the algorithms underlying the conversion of Dec year+day dates and [doe]{.tool data-bs-toggle="tooltip" data-bs-title="days of era"} is [Hinnant, Howard](https://howardhinnant.github.io). [2021+184]{.tool data-bs-toggle="tooltip" data-bs-title="2021-09-01"}. "`chrono`-Compatible Low-Level Date Algorithms." \${decYear}+\${decDotyPad}. <https://howardhinnant.github.io/date_algorithms.html>.{{< include /asset/_cite.qmd >}}{{< include /asset/_glossary.qmd >}}{{< include /dec/date/_index.qmd >}}