diff --git a/calendar.js b/calendar.js index bc45717..9289bc4 100644 --- a/calendar.js +++ b/calendar.js @@ -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 diff --git a/seth.html b/seth.html index 3461398..6e78bdc 100644 --- a/seth.html +++ b/seth.html @@ -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 — months, weeks, days, hours, minutes, seconds — are zero-indexed. + All units in the Seth system — months, days, hours, minutes, seconds — are zero-indexed.

Credit is due to the French Republican Calendar (1793), which pioneered both ideas: @@ -134,27 +134,32 @@

Seth Date uses the same year numbers and January 1 new year as the Gregorian - calendar. The year is divided into 10 months of 36 days (6 weeks of 6 days each), + calendar. The year is divided into 10 months of 36 days each, followed by 5 holiday days at year end (6 on leap years). - All units are zero-indexed: months 0–9, days 0–35, weeks 0–5, weekdays 0–5. + All units are zero-indexed: months 0–9, days-of-month 0–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: 1 Seth second = 0.864 SI seconds (86,400 SI seconds per day ÷ 100,000 Seth seconds per day).

Leap Day (Gregorian Feb 29) is a special intercalary day that exists - outside the normal month and week structure. It is inserted between Month 1, Week 3, Day 4 - and Month 1, Week 3, Day 5 — 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. -

-

Reading the date: dates are written as - Year M W D — - e.g. Month 3, Week 2, Day 4 means the 3rd month (0-indexed), week 2, day 4 of that week, - which is day 16 of the month (2×6 + 4). - Holiday days are written as Holiday N (N = 0–4, or 0–5 on leap years) and fall outside any month or week. + outside 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.

+

Date notation: dates are written as day.month (day-of-month first, zero-indexed).

+ + + + + + + + +
FormatPatternExample (day 16 of month 3, year 2026)
ShortD.M16.3
MediumD.M.YY16.3.26
LogDD.M.YYYY16.3.2026
Full / reverseYYYY.M.DD2026.3.16
+

Holiday days are written as H0H4 (or H5 on leap years).

Months (months 0–9, days 0–35, approx. Gregorian ranges):

@@ -171,34 +176,21 @@
#DaysApprox. GregorianNotes
90–35Nov 21 – Dec 26Ends Dec 25 on leap years
-

Weeks (weeks 0–5 within each month, days 0–5 within each week):

- - - - - - - - - - -
WeekDays
00–5
16–11
212–17
318–23
424–29
530–35
-

Holiday days (after Month 9, Day 35):

+

Holiday days (after Month 9, Day 35 — always exactly 5):

- - - - - - + + + + +
HolidayNormal yearLeap year
H0Dec 27Dec 26 — Boxing Day
H1Dec 28Dec 27
H2Dec 29Dec 28
H3Dec 30Dec 29
H4Dec 31 — New Year's EveDec 30
H5*Dec 31 — New Year's Eve
H0Dec 27Dec 27
H1Dec 28Dec 28
H2Dec 29Dec 29
H3Dec 30Dec 30
H4Dec 31 — New Year's EveDec 31 — New Year's Eve

- * Leap years only.
+ Leap Day (Feb 29) is the intercalary day, not an extra holiday.
Christmas (Dec 25) falls on Month 9, Day 34 in normal years, and Month 9, Day 35 in leap years.
- 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).

diff --git a/seth.js b/seth.js index bdd06f4..110444a 100644 --- a/seth.js +++ b/seth.js @@ -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) ---