This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| yivalkes:calendar [2026/04/19 00:30] – wikarai | yivalkes:calendar [2026/04/27 04:52] (current) – mangotrain | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| < | < | ||
| - | |||
| <!-- Hi fellow cheesebrain ;> --> | <!-- Hi fellow cheesebrain ;> --> | ||
| - | + | </ | |
| - | + | ||
| - | </ | + | |
| - | + | ||
| - | While the year used to be based off the moon cycles (**Yadellna** or moon year), this has changed in preference to the solar cycle (**Yasha**). | + | |
| < | < | ||
| - | <div id=" | + | < |
| - | <strong style=" | + | /* Force the calendar icon to white and the popup to dark mode */ |
| + | # | ||
| + | color-scheme: | ||
| + | } | ||
| + | # | ||
| + | filter: invert(1); | ||
| + | cursor: pointer; | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | <div id=" | ||
| + | <strong style=" | ||
| <div id=" | <div id=" | ||
| <div id=" | <div id=" | ||
| + | </ | ||
| + | |||
| + | <div id=" | ||
| + | <span style=" | ||
| + | <div style=" | ||
| + | <input type=" | ||
| + | </ | ||
| + | <div id=" | ||
| </ | </ | ||
| </ | </ | ||
| + | |||
| + | ====== Year ====== | ||
| + | |||
| + | While the year used to be based off the moon cycles (**Yadellna** or moon year), this has changed in preference to the solar cycle (**Yasha**). | ||
| ====== Calendar Structure ====== | ====== Calendar Structure ====== | ||
| Line 23: | Line 40: | ||
| * 8 regular weeks of 5 days | * 8 regular weeks of 5 days | ||
| * 4 to 6 celebratory days (**Levannas**) | * 4 to 6 celebratory days (**Levannas**) | ||
| - | * The holiday proper | + | * The holiday proper |
| ====== Day and Week Logic ====== | ====== Day and Week Logic ====== | ||
| Line 38: | Line 55: | ||
| ^ Month ^ First day ^ 2nd day ^ 3rd day ^ 4th day ^ 5th day ^ | ^ Month ^ First day ^ 2nd day ^ 3rd day ^ 4th day ^ 5th day ^ | ||
| + | ^ Wilaf ^ Nemf ^ Doof ^ Leffe ^ Tshof ^ Bamf ^ | ||
| ^ Week 1 | 11 | 21 | 31 | 41 | 51 | | ^ Week 1 | 11 | 21 | 31 | 41 | 51 | | ||
| + | ^ Nenar | Nenarla / Shaalen / Nennelen | Binnelen | Lennelen | Gunnelen | Baniineren | | ||
| ^ Week 2 | 12 | 22 | 32 | 42 | 52 | | ^ Week 2 | 12 | 22 | 32 | 42 | 52 | | ||
| + | ^ Doolar | Doolarla / Dootslen / NeDoolen | BiDoolen | LeDoolen | KuDoolen | PanDoolen | | ||
| ^ Week 3 | 13 | 23 | 33 | 43 | 53 | | ^ Week 3 | 13 | 23 | 33 | 43 | 53 | | ||
| + | ^ Lelar | Lelarla / Nitslen / NeLaaren | BiLaaren | Lilleren | GuuLaren | Banarlen | | ||
| ^ Week 4 | 14 | 24 | 34 | 44 | 54 | | ^ Week 4 | 14 | 24 | 34 | 44 | 54 | | ||
| + | ^ Goolar | Goolarla / Tsoorelen / NeRuulen | BiRuulen * | LeRuulen | KuRuulen | Banoorlen | | ||
| ^ Week 5 | 15 | 25 | 35 | 45 | 55 | | ^ Week 5 | 15 | 25 | 35 | 45 | 55 | | ||
| + | ^ Bammar | Bammarla / Sheenelen / NeVameng | BiVameng | LeVameng | KuVameng | FaVameng * | | ||
| ^ Week 6 | 16 | 26 | 36 | 46 | 56 | | ^ Week 6 | 16 | 26 | 36 | 46 | 56 | | ||
| + | ^ Duulelar | Duulelarla / NeDuuleren | BiDuuleren | LeDuuleren | KuDuuleren | PaDuuleren | | ||
| ^ Week 7 | 17 | 27 | 37 | 47 | 57 | | ^ Week 7 | 17 | 27 | 37 | 47 | 57 | | ||
| + | ^ Niraar | Niraarla / NeNirlen | BiNirlen | LeNirlen | KuNirlen | PanNirlen / NeBellen | | ||
| ^ Last week | 10 | 20 | 30 | 40 | 50 | | ^ Last week | 10 | 20 | 30 | 40 | 50 | | ||
| + | ^ Barell | Barella / | BiGiilen | LeLiilen | GuWiilen | BaNiilen | | ||
| ^ Levannas | (6) 5 | 4 | 3 | 2 | 1/0 | | ^ Levannas | (6) 5 | 4 | 3 | 2 | 1/0 | | ||
| + | ^ Levannas | (Lenduley) Lembami | Lenko' | ||
| + | |||
| + | * BiRuulen is a great day for beating things, like dusty cloths or aging leather. | ||
| + | |||
| + | * Favameng is a great day for silly jokes. | ||
| + | |||
| < | < | ||
| < | < | ||
| (function() { | (function() { | ||
| - | | + | |
| - | const holidayDefinitions = [ | + | const currentYear = targetDate.getFullYear(); |
| - | { name: " | + | |
| - | { name: " | + | { name: " |
| - | { name: "Orakk (Spring-Summer Cusp)", | + | { name: " |
| - | { name: " | + | { name: "Orakk (Spring-Summer Cusp)", |
| - | { name: " | + | { name: " |
| - | { name: " | + | { name: " |
| - | { name: " | + | { name: " |
| - | { name: " | + | { name: " |
| - | ]; | + | { name: " |
| + | ]; | ||
| - | const now = new Date(); | + | |
| - | const today = new Date(Date.UTC(now.getFullYear(), | + | [-1, 0, 1].forEach(yearOffset => { |
| - | const currentYear = today.getUTCFullYear(); | + | holidayDefinitions.forEach(def => { |
| - | + | const parts = def.date.split(' | |
| - | | + | |
| - | [-1, 0, 1].forEach(yearOffset => { | + | name: def.name, |
| - | holidayDefinitions.forEach(def => { | + | month: def.month, |
| - | allHolidays.push({ | + | monthName: def.monthName, |
| - | name: def.name, | + | dateObj: new Date(currentYear + yearOffset, parseInt(parts[1]) - 1, parseInt(parts[2])) |
| - | month: def.month, | + | }); |
| - | monthName: def.monthName, | + | |
| - | dateObj: new Date(Date.UTC(currentYear + yearOffset, parseInt(def.date.split(' | + | |
| }); | }); | ||
| }); | }); | ||
| - | }); | ||
| - | | + | |
| + | let nextHolidayIndex = allHolidays.findIndex(h => h.dateObj >= targetDate); | ||
| + | let nextHoliday = allHolidays[nextHolidayIndex]; | ||
| + | let prevHoliday = allHolidays[nextHolidayIndex - 1]; | ||
| - | let nextHolidayIndex | + | const msPerDay |
| - | let nextHoliday | + | const D = Math.floor((targetDate - prevHoliday.dateObj) / msPerDay); |
| - | let prevHoliday = allHolidays[nextHolidayIndex | + | const daysLeft |
| - | const msPerDay = 1000 * 60 * 60 * 24; | + | |
| - | const D = Math.floor((today - prevHoliday.dateObj) / msPerDay); | + | if (daysLeft === 0) { |
| - | const daysLeft = Math.floor((nextHoliday.dateObj - today) / msPerDay); | + | displayDate = " |
| - | + | } else if (D <= 40) { | |
| - | | + | let weekNum = Math.ceil(D / 5); |
| - | let displayDetails = ""; | + | let dayInWeek = D - (weekNum - 1) * 5; |
| - | + | let weekChar = weekNum === 8 ? " | |
| - | | + | |
| - | displayDate = " | + | } else { |
| - | | + | displayDate = " |
| - | | + | |
| - | let weekNum = Math.ceil(D / 5); | + | return { date: displayDate, |
| - | let dayInWeek = D - (weekNum - 1) * 5; | + | |
| - | let weekChar = weekNum === 8 ? " | + | |
| - | let yivalkesDate | + | |
| - | + | ||
| - | displayDate = "Day " + yivalkesDate | + | |
| - | | + | |
| - | | + | |
| - | displayDate = " | + | |
| - | | + | |
| } | } | ||
| - | document.getElementById(' | + | |
| - | document.getElementById(' | + | today.setHours(0, |
| + | const currentRes = calculateYivalkes(today); | ||
| + | | ||
| + | document.getElementById(' | ||
| + | |||
| + | const picker = document.getElementById(' | ||
| + | const resultSpan = document.getElementById(' | ||
| + | picker.addEventListener(' | ||
| + | if (!e.target.value) return; | ||
| + | const parts = e.target.value.split(' | ||
| + | const selectedDate = new Date(parts[0], | ||
| + | const res = calculateYivalkes(selectedDate); | ||
| + | resultSpan.innerHTML = res.date; | ||
| + | }); | ||
| })(); | })(); | ||
| </ | </ | ||
| </ | </ | ||