Replace week notation with day.month date format; fix leap year M2-M9 DOY offset and holiday count

This commit is contained in:
2026-03-08 23:51:26 +00:00
parent a6b3f039d8
commit 9bd245d870
3 changed files with 66 additions and 51 deletions
+6 -14
View File
@@ -408,11 +408,15 @@ function renderTabs() {
function renderMonth(year, month) {
const leap = isLeapYear(year);
const monthStart = month * 36 + 1; // doy of Month N Day 0 (N=0..9)
// doy of Month N Day 0. In a leap year, months 2-9 start one DOY later
// because leap day (DOY 60) sits inside Month 1.
const monthStart = month * 36 + 1 + (leap && month >= 2 ? 1 : 0);
// Approx gregorian range for subtitle
// Leap M1 ends at DOY 73 (Mar 13) not 72, because the split cell adds 1
const isLeapM1 = leap && month === 1;
const gStart = gregLabel(year, monthStart);
const gEnd = gregLabel(year, monthStart + 35);
const gEnd = gregLabel(year, monthStart + 35 + (isLeapM1 ? 1 : 0));
navTitle.childNodes[0].textContent = `${year} · Month ${month}`;
navSub.textContent = `${gStart} ${gEnd}`;
@@ -431,7 +435,6 @@ function renderMonth(year, month) {
// In a leap year, M1 W3 D4 is split: top=Feb28(DOY59), bottom=LeapDay(DOY60)
// All cells from dayInMonth>=23 (W3 D5 onward) get doy+1 to skip over leap day
const isLeapM1 = leap && month === 1;
for (let week = 0; week <= 5; week++) {
for (let wd = 0; wd <= 5; wd++) {
@@ -488,13 +491,8 @@ function renderMonth(year, month) {
const topGreg = document.createElement("div");
topGreg.className = "greg-date";
topGreg.textContent = `${gregWd} ${gregLabel(year, doy)}`;
const topWd = document.createElement("div");
topWd.className = "greg-date";
topWd.style.color = "#555";
topWd.textContent = `W${week} D${wd}`;
topHalf.appendChild(topNum);
topHalf.appendChild(topGreg);
topHalf.appendChild(topWd);
cell.appendChild(topHalf);
// ── Bottom half: Leap Day (Feb 29), its own independent mini-cell ──
@@ -540,14 +538,8 @@ function renderMonth(year, month) {
greg.className = "greg-date";
greg.textContent = `${gregWd} ${gregLabel(year, doy)}`;
const wdLabel = document.createElement("div");
wdLabel.className = "greg-date";
wdLabel.style.color = "#555";
wdLabel.textContent = `W${week} D${wd}`;
cell.appendChild(dayNum);
cell.appendChild(greg);
cell.appendChild(wdLabel);
}
// Holiday markers — for split cells, attach to topHalf (Feb 28); otherwise to cell
+27 -35
View File
@@ -116,7 +116,7 @@
Decimal time was paired with it for the same reason: the standard 24-hour clock is an arbitrary
Babylonian inheritance. Dividing the day into 10 hours of 100 minutes of 100 seconds gives a
fully base-10 time system that is easier to reason about and calculate with.
All units in the Seth system &mdash; months, weeks, days, hours, minutes, seconds &mdash; are zero-indexed.
All units in the Seth system &mdash; months, days, hours, minutes, seconds &mdash; are zero-indexed.
</p>
<p>
Credit is due to the <strong>French Republican Calendar</strong> (1793), which pioneered both ideas:
@@ -134,27 +134,32 @@
<div class="seth-note">
<p>
<strong>Seth Date</strong> uses the same year numbers and January 1 new year as the Gregorian
calendar. The year is divided into <strong>10 months of 36 days</strong> (6 weeks of 6 days each),
calendar. The year is divided into <strong>10 months of 36 days each</strong>,
followed by <strong>5 holiday days</strong> at year end (6 on leap years).
All units are <strong>zero-indexed</strong>: months 0&ndash;9, days 0&ndash;35, weeks 0&ndash;5, weekdays 0&ndash;5.
All units are <strong>zero-indexed</strong>: months 0&ndash;9, days-of-month 0&ndash;35.
Time uses the same decimal system: 10 hours, 100 minutes, 100 seconds per day.
The Seth second is derived from the Unix second (which equals the SI second, leap seconds aside)
at a fixed ratio: <strong>1 Seth second = 0.864 SI seconds</strong> (86,400 SI seconds per day &divide; 100,000 Seth seconds per day).
</p>
<p>
<strong>Leap Day</strong> (Gregorian Feb 29) is a special intercalary day that exists
<em>outside</em> the normal month and week structure. It is inserted between Month 1, Week 3, Day 4
and Month 1, Week 3, Day 5 &mdash; occupying DOY 60 in its own slot. After Leap Day the calendar
resumes at D5 unchanged, which is why every Seth date from March 1 onward falls on the same
Gregorian date every year (e.g. Christmas is always Month 9, Day 34). On the calendar it appears
as a split cell sharing the D4 column: the top half is the normal D4 day, the bottom half is Leap Day.
</p>
<p><strong>Reading the date:</strong> dates are written as
<em>Year M W D</em> &mdash;
e.g. <em>Month 3, Week 2, Day 4</em> means the 3rd month (0-indexed), week 2, day 4 of that week,
which is day 16 of the month (2&times;6 + 4).
Holiday days are written as <em>Holiday N</em> (N = 0&ndash;4, or 0&ndash;5 on leap years) and fall outside any month or week.
<em>outside</em> the normal month structure. It is inserted at day-of-year 60, between
day 22 and day 23 of Month 1. After Leap Day the calendar resumes unchanged, which is why
every Seth date from March 1 onward falls on the same Gregorian date every year
(e.g. Christmas is always Month 9, Day 34). On the calendar it appears as a split cell:
the top half is day 22, the bottom half is Leap Day.
</p>
<p><strong>Date notation:</strong> dates are written as <em>day.month</em> (day-of-month first, zero-indexed).</p>
<table class="ref-table">
<thead><tr><th>Format</th><th>Pattern</th><th>Example (day 16 of month 3, year 2026)</th></tr></thead>
<tbody>
<tr><td>Short</td><td>D.M</td><td>16.3</td></tr>
<tr><td>Medium</td><td>D.M.YY</td><td>16.3.26</td></tr>
<tr><td>Log</td><td>DD.M.YYYY</td><td>16.3.2026</td></tr>
<tr><td>Full / reverse</td><td>YYYY.M.DD</td><td>2026.3.16</td></tr>
</tbody>
</table>
<p>Holiday days are written as <em>H0</em>&ndash;<em>H4</em> (or <em>H5</em> on leap years).</p>
<p><strong>Months</strong> (months 0&ndash;9, days 0&ndash;35, approx. Gregorian ranges):</p>
<table class="ref-table">
<thead><tr><th>#</th><th>Days</th><th>Approx. Gregorian</th><th>Notes</th></tr></thead>
@@ -171,34 +176,21 @@
<tr><td>9</td><td>0&ndash;35</td><td>Nov 21 &ndash; Dec 26</td><td>Ends Dec 25 on leap years</td></tr>
</tbody>
</table>
<p><strong>Weeks</strong> (weeks 0&ndash;5 within each month, days 0&ndash;5 within each week):</p>
<table class="ref-table">
<thead><tr><th>Week</th><th>Days</th></tr></thead>
<tbody>
<tr><td>0</td><td>0&ndash;5</td></tr>
<tr><td>1</td><td>6&ndash;11</td></tr>
<tr><td>2</td><td>12&ndash;17</td></tr>
<tr><td>3</td><td>18&ndash;23</td></tr>
<tr><td>4</td><td>24&ndash;29</td></tr>
<tr><td>5</td><td>30&ndash;35</td></tr>
</tbody>
</table>
<p><strong>Holiday days</strong> (after Month 9, Day 35):</p>
<p><strong>Holiday days</strong> (after Month 9, Day 35 — always exactly 5):</p>
<table class="ref-table">
<thead><tr><th>Holiday</th><th>Normal year</th><th>Leap year</th></tr></thead>
<tbody>
<tr><td>H0</td><td>Dec 27</td><td>Dec 26 &mdash; Boxing Day</td></tr>
<tr><td>H1</td><td>Dec 28</td><td>Dec 27</td></tr>
<tr><td>H2</td><td>Dec 29</td><td>Dec 28</td></tr>
<tr><td>H3</td><td>Dec 30</td><td>Dec 29</td></tr>
<tr><td>H4</td><td>Dec 31 &mdash; New Year's Eve</td><td>Dec 30</td></tr>
<tr><td>H5*</td><td>&mdash;</td><td>Dec 31 &mdash; New Year's Eve</td></tr>
<tr><td>H0</td><td>Dec 27</td><td>Dec 27</td></tr>
<tr><td>H1</td><td>Dec 28</td><td>Dec 28</td></tr>
<tr><td>H2</td><td>Dec 29</td><td>Dec 29</td></tr>
<tr><td>H3</td><td>Dec 30</td><td>Dec 30</td></tr>
<tr><td>H4</td><td>Dec 31 &mdash; New Year's Eve</td><td>Dec 31 &mdash; New Year's Eve</td></tr>
</tbody>
</table>
<p style="font-size:0.8rem;">
* Leap years only.<br>
Leap Day (Feb 29) is the intercalary day, not an extra holiday.<br>
Christmas (Dec 25) falls on Month 9, Day 34 in normal years, and Month 9, Day 35 in leap years.<br>
Dec 26 (Boxing Day) is Month 9, Day 35 in normal years, and Holiday 0 in leap years.
Dec 26 (Boxing Day) is Month 9, Day 35 in normal years, and Month 9, Day 35 in leap years (same slot, one day earlier Gregorian).
</p>
</div>
</details>
+33 -2
View File
@@ -68,13 +68,44 @@ function getDayOfYear(date, zone) {
return { year, doy };
}
// Notation helpers
// short: D.M e.g. "30.1"
// medium: D.M.YY e.g. "30.1.26"
// log: DD.M.YYYY e.g. "30.1.2026" (DD zero-pads to 2 digits)
// full: YYYY.M.DD e.g. "2026.1.30"
function sethShort(sd) {
if (sd.type === "leapday") return "Leap Day";
if (sd.type === "holiday") return `H${sd.holiday}`;
return `${sd.day}.${sd.month}`;
}
function sethMedium(sd) {
if (sd.type === "leapday") return "Leap Day";
if (sd.type === "holiday") return `H${sd.holiday}.${String(sd.year).slice(-2)}`;
return `${sd.day}.${sd.month}.${String(sd.year).slice(-2)}`;
}
function sethLog(sd) {
if (sd.type === "leapday") return `Leap Day ${sd.year}`;
if (sd.type === "holiday") return `H${sd.holiday}.${sd.year}`;
return `${String(sd.day).padStart(2,"0")}.${sd.month}.${sd.year}`;
}
function sethFull(sd) {
if (sd.type === "leapday") return `${sd.year}.Leap`;
if (sd.type === "holiday") return `${sd.year}.H${sd.holiday}`;
return `${sd.year}.${sd.month}.${sd.day}`;
}
// Legacy display helpers (used by seth.html dateLine)
function formatSethDate(sd) {
if (sd.type === "leapday") return "Leap Day";
if (sd.type === "holiday") {
const total = sd.leap ? 6 : 5;
return `Holiday ${sd.holiday} of ${total}`;
}
return `Month ${sd.month}, Week ${sd.week}, Day ${sd.weekDay}`;
return `${sd.day}.${sd.month} (Month ${sd.month}, Day ${sd.day})`;
}
function formatSethLong(sd) {
@@ -88,7 +119,7 @@ function formatSethLong(sd) {
else if (isBoxingDay) note = " — Boxing Day";
return `${sd.year} Holiday ${sd.holiday}${note}`;
}
return `${sd.year} M${sd.month} W${sd.week} D${sd.weekDay} (Month ${sd.month}, Day ${sd.day})`;
return `${sethLog(sd)} (${sd.year}.${sd.month}.${sd.day})`;
}
// --- Decimal time (same as decimal page) ---