From 758dc1ae3770f528492ad799f266e8eefeba6c7d Mon Sep 17 00:00:00 2001 From: letterly <70981501+letterly@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:55:48 -0500 Subject: [PATCH] Add files via upload --- calendar-changelog.html | 4 ++++ calendar-data.js | 2 ++ calendar.html | 2 +- calendar.js | 53 +++++++++++++++++++++++++++++------------ calendarharris.js | 7 +++--- 5 files changed, 49 insertions(+), 19 deletions(-) diff --git a/calendar-changelog.html b/calendar-changelog.html index b9e5032..0bffb84 100644 --- a/calendar-changelog.html +++ b/calendar-changelog.html @@ -17,6 +17,10 @@
Updates
+3 March 2024
+>Monthly celebrations is now called Monthly practices +>Added Rhumb line prayer direction calculators +2 March 2024
>Finally fixed issues with the prayer direction determiner >Added a few new cities diff --git a/calendar-data.js b/calendar-data.js index 5e24b82..32d6dbf 100644 --- a/calendar-data.js +++ b/calendar-data.js @@ -1870,6 +1870,7 @@ calendars = { era: "AA", link: "https://en.wikipedia.org/wiki/Mandaean_calendar", }, + /* "Mandaean Reformed": { firstDay: "Sunday", dayStart: "Sunrise", @@ -1961,6 +1962,7 @@ calendars = { era: "AA", link: "https://en.wikipedia.org/wiki/Mandaean_calendar", }, + */ Minguo: { firstDay: "Sunday", dayStart: "Midnight", diff --git a/calendar.html b/calendar.html index 7be689a..bbadfbb 100644 --- a/calendar.html +++ b/calendar.html @@ -30,7 +30,7 @@Universal Calendar Project
- + diff --git a/calendar.js b/calendar.js index 73a9f90..a62037b 100644 --- a/calendar.js +++ b/calendar.js @@ -382,6 +382,10 @@ function locationChange(){ lat: 21.4225, long: 39.826167, }, + Kaaba2: { + lat: 21.4225, + long: 39.826167, + }, Gerizim: { lat: 32.200861, long: 35.273258, @@ -390,6 +394,10 @@ function locationChange(){ lat: 31.778056, long: 35.235833, }, + Temple2: { + lat: 31.778056, + long: 35.235833, + }, Qiblih: { lat: 32.943611, long: 35.091944, @@ -401,17 +409,32 @@ function locationChange(){ } for(h of Object.keys(holysites)){ - g = directionalize(holysites[h].lat, holysites[h].long) - if(holysites[h].long < locinfo[1]){ - if(g < 0){ - g = 360 + g + if(!h.endsWith("2")){ + g = directionalize(holysites[h].lat, holysites[h].long) + if(holysites[h].long < locinfo[1]){ + if(g < 0){ + g = 360 + g + } + else{ + g += 180 + } } else{ - g += 180 + if(g < 0) g = 180 + g } } else{ - if(g < 0) g = 180 + g + latA = locinfo[0] * Math.PI / 180 + latB = holysites[h.slice(0,-1)].lat * Math.PI / 180 + lonA = locinfo[1] * Math.PI / 180 + lonB = holysites[h.slice(0,-1)].long * Math.PI / 180 + Δφ = Math.log( Math.tan( latB / 2 + Math.PI / 4 ) / Math.tan( latA / 2 + Math.PI / 4) ) + Δlon = Math.abs( lonA - lonB ) + g = Math.atan2( Δlon , Δφ ) + g = g * 180 / Math.PI + if(holysites[h].long < locinfo[1]){ + g = 360 - g + } } g = Math.round(g * 10) / 10 dir = "" @@ -427,14 +450,14 @@ function locationChange(){ } angles.innerHTML = "Directions of prayer: " - if(city != "Jerusalem") angles.innerHTML += "Judaism (Mizrah): " + holysites.Temple.direction - else angles.innerHTML += `Judaism (Mizrah): Face the Temple Mount` - if(city != "Nablus") angles.innerHTML += " | Samaritanism: " + holysites.Gerizim.direction - else angles.innerHTML += `Samaritanism: Face Mount Gerizim` - if(city != "Mecca") angles.innerHTML += ` | Islam (Qibla): ` + holysites.Kaaba.direction - else angles.innerHTML += ` | Islam (Qibla): Face the Kaaba` - if(city != "Akko") angles.innerHTML += " | Bahá'í (Qiblih): " + holysites.Qiblih.direction - else angles.innerHTML += ` | Bahá'í (Qiblih): Face the Shrine of Baháʼu'lláh` + if(city != "Jerusalem") angles.innerHTML += "Judaism (Mizrah): " + holysites.Temple.direction + ` Great Circle // ` + holysites.Temple2.direction + ` Rhumb Line` + else angles.innerHTML += `Judaism (Mizrah): Face the Temple Mount` + if(city != "Nablus") angles.innerHTML += " | Samaritanism: " + holysites.Gerizim.direction + else angles.innerHTML += ` | Samaritanism: Face Mount Gerizim` + if(city != "Mecca") angles.innerHTML += ` | Islam (Qibla): ` + holysites.Kaaba.direction + ` Great Circle // ` + holysites.Kaaba2.direction + ` Rhumb Line` + else angles.innerHTML += ` | Islam (Qibla): Face the Kaaba` + if(city != "Akko") angles.innerHTML += " | Bahá'í (Qiblih): " + holysites.Qiblih.direction + else angles.innerHTML += ` | Bahá'í (Qiblih): Face the Shrine of Baháʼu'lláh` } @@ -3639,7 +3662,7 @@ function holidaycheck(thatday){ if(thatday["Bahá'í"].startsWith("1 ")){ monthly.innerHTML += `Bahá'í Faith: Nineteen Day Feast
` } - if(monthly.innerHTML != "") monthly.innerHTML = "Monthly celebrations
" + monthly.innerHTML + if(monthly.innerHTML != "") monthly.innerHTML = "Monthly traditions
" + monthly.innerHTML // weekly.innerHTML = "" diff --git a/calendarharris.js b/calendarharris.js index 23c059b..c0b9a73 100644 --- a/calendarharris.js +++ b/calendarharris.js @@ -8,6 +8,7 @@ startDays = { "Hebrew": [1, "Shvat", 5660], "Islamic Tabular": [28, "Sha'ban", 1317], "Bengali": [18, "Poush", 1306], + "Mandaean": [19, "Ṣilmia", 445269], } hebrewCons = (/*660*/"rcdcrccrdc|drccrdcrcd|rccdrccdrc|drccrdcrcd|crcdrcdrcc|drccdrccrd|crdcrcdcrc|drcdcrcdrc|cdrccrdcrd|crcdcrcdrc|cdrccdrcdr|ccrdcrcdrc|cdrcdcrccr|dcrdccrdcr|cdrcdcrcdr|ccdrccrdcr|dc"/*to 821*/).replace(/\|/g,"") @@ -39,7 +40,7 @@ function toHarrisDate(date, cal){ firstDays = dayWithinYear(startDays[cal].join(" "), cal).split("/")[1] - dayWithinYear(startDays[cal].join(" "), cal).split("/")[0] + 1 intermediateYears = 0 for(x = startDays[cal][2] + 1; x < leYear; x++){ - //intermediateYears += daysWithinYear(getYear(x, cal)) + intermediateYears += daysWithinYear(getYear(x, cal)) } finalDays = dayWithinYear(date, cal).split("/")[0] total = firstDays + +intermediateYears + +finalDays @@ -86,8 +87,8 @@ function dayWithinYear(date, cal){ function daysInYear(calArray){ return calArray.map(x => x.split(":")[1]).reduce((a, b) => +a + +b, 0) } - -//console.log(toHarrisDate("2 February 1901", "Gregorian")) +console.log(toHarrisDate("2 January 1900", "Gregorian")) +console.log(toHarrisDate("2 February 1901", "Gregorian")) function getYear(year, cal){ /*