add erisian time
This commit is contained in:
63
index.html
63
index.html
@@ -152,10 +152,12 @@
|
||||
<link rel="icon" href="favicon.ico" type="image/x-icon"><link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" type="text/css" href="anthrstlsht.css">
|
||||
<script type="text/javascript" src="dtime.js"></script>
|
||||
<title>solar wheel of the year</title>
|
||||
</head>
|
||||
<body>
|
||||
<br><p align="center"><input type="button" onclick="document.getElementById('soltable').innerHTML = makeTable(-11, 'UTC-11');" value="UTC-11"/>
|
||||
<br><p align="center"><input type="button" onclick="document.getElementById('soltable').innerHTML = makeTable('UTC', 'erisian');" value="Erisian time"/></p>
|
||||
<p align="center">Christian time:<br><input type="button" onclick="document.getElementById('soltable').innerHTML = makeTable(-11, 'UTC-11');" value="UTC-11"/>
|
||||
<input type="button" onclick="document.getElementById('soltable').innerHTML = makeTable(-10, 'UTC-10');" value="UTC-10"/>
|
||||
<input type="button" onclick="document.getElementById('soltable').innerHTML = makeTable(-9, 'UTC-9');" value="UTC-9"/>
|
||||
<input type="button" onclick="document.getElementById('soltable').innerHTML = makeTable(-8, 'UTC-8');" value="UTC-8"/>
|
||||
@@ -193,67 +195,78 @@ var AutumnalEquinox2021 = new Date('Wed Sep 22 2021 19:21:03 GMT+0000');
|
||||
var SouthernSolstice2021 = new Date('Tue Dec 21 2021 15:59:16 GMT+0000');
|
||||
var VernalEquinox2022 = new Date('Sun Mar 20 2022 15:33:23 GMT+0000');
|
||||
|
||||
function formatedDate(datein) {
|
||||
var dateout = "" + ("0" + ( datein.getUTCDate())).slice(-2) + "." + ("0" + ( datein.getUTCMonth() + 1)).slice(-2) + " " + ("0" + datein.getUTCHours()).slice(-2) + ":" + ("0" + datein.getUTCMinutes()).slice(-2);
|
||||
function formatedDate(datein, timeoutput) {
|
||||
if (timeoutput == 'erisian') var dateout = dtime(datein, 'timeofyold');
|
||||
else var dateout = "" + ("0" + ( datein.getUTCDate())).slice(-2) + "." + ("0" + ( datein.getUTCMonth() + 1)).slice(-2) + " " + ("0" + datein.getUTCHours()).slice(-2) + ":" + ("0" + datein.getUTCMinutes()).slice(-2);
|
||||
return dateout;
|
||||
}
|
||||
|
||||
function tableRow(vernalequinox) {
|
||||
function tableRow(vernalequinox, timeoutput) {
|
||||
var stringout = "<td>";
|
||||
if (vernalequinox.getYear() == VernalEquinox2021.getYear()) stringout += "<b>";
|
||||
stringout += vernalequinox.getFullYear();
|
||||
if (vernalequinox.getYear() == VernalEquinox2021.getYear()) stringout += "</b>";
|
||||
if (vernalequinox.getYear() == VernalEquinox2021.getYear()) stringout += "<b>";
|
||||
if (timeoutput == 'erisian') stringout += dtime(vernalequinox, 'yold');
|
||||
else stringout += vernalequinox.getFullYear();
|
||||
if (vernalequinox.getYear() == VernalEquinox2021.getYear()) stringout += "</b>";
|
||||
var Imbolc = new Date(vernalequinox.getTime() - ((VernalEquinox2022.getTime() - SouthernSolstice2021.getTime()) / 2));
|
||||
stringout += '<td class = "even">' + formatedDate(Imbolc) + "</td>";
|
||||
stringout += "</td><td>" + formatedDate(vernalequinox) + "</td>";
|
||||
stringout += '<td class = "even">' + formatedDate(Imbolc, timeoutput) + "</td>";
|
||||
stringout += '</td><td>' + formatedDate(vernalequinox, timeoutput) + "</td>";
|
||||
var Beltane = new Date(vernalequinox.getTime() + ((NorthernSolstice2021.getTime() - VernalEquinox2021.getTime()) / 2));
|
||||
stringout += '<td class = "even">' + formatedDate(Beltane) + "</td>";
|
||||
stringout += '<td class = "even">' + formatedDate(Beltane, timeoutput) + "</td>";
|
||||
var Midsummer = new Date(vernalequinox.getTime() + (NorthernSolstice2021.getTime() - VernalEquinox2021.getTime()));
|
||||
stringout += "<td>" + formatedDate(Midsummer) + "</td>";
|
||||
stringout += '<td>' + formatedDate(Midsummer, timeoutput) + "</td>";
|
||||
var Lughnasadh = new Date(vernalequinox.getTime() + ((NorthernSolstice2021.getTime() - VernalEquinox2021.getTime()) + (AutumnalEquinox2021.getTime() - NorthernSolstice2021.getTime()) / 2));
|
||||
stringout += '<td class = "even">' + formatedDate(Lughnasadh) + "</td>";
|
||||
stringout += '<td class = "even">' + formatedDate(Lughnasadh, timeoutput) + "</td>";
|
||||
var Mabon = new Date(vernalequinox.getTime() + (AutumnalEquinox2021.getTime() - VernalEquinox2021.getTime()));
|
||||
stringout += "<td>" + formatedDate(Mabon) + "</td>";
|
||||
stringout += '<td>' + formatedDate(Mabon, timeoutput) + "</td>";
|
||||
var Samhain = new Date(vernalequinox.getTime() + ((AutumnalEquinox2021.getTime() - VernalEquinox2021.getTime()) + (SouthernSolstice2021.getTime() - AutumnalEquinox2021.getTime()) / 2));
|
||||
stringout += '<td class = "even">' + formatedDate(Samhain) + "</td>";
|
||||
stringout += '<td class = "even">' + formatedDate(Samhain, timeoutput) + "</td>";
|
||||
var Yule = new Date(vernalequinox.getTime() + (SouthernSolstice2021.getTime() - VernalEquinox2021.getTime()));
|
||||
stringout += "<td>" + formatedDate(Yule) + "</td>";
|
||||
stringout += '<td>' + formatedDate(Yule, timeoutput) + "</td>";
|
||||
return stringout;
|
||||
}
|
||||
|
||||
function makeTable(UTC, UTCstr) {
|
||||
function makeTable(UTC, timeoutput) {
|
||||
|
||||
var fulltable = "<table><caption>";
|
||||
now = new Date();
|
||||
fulltable += 'Approximate astronomical <a href="https://en.wikipedia.org/wiki/Wheel_of_the_Year">Wheel of the Year</a> - ' + '<a href="https://en.wikipedia.org/wiki/Coordinated_Universal_Time"><b>' + UTCstr + "</b></a><br>";
|
||||
fulltable += 'Model: 2021 <a href="https://en.wikipedia.org/wiki/Tropical_year">Tropical year</a> - ' + ( ( VernalEquinox2022 - VernalEquinox2021 ) / 1000 / 60 / 60 / 24 ) + " days (view source for details)</caption>";
|
||||
fulltable += '<tr><th>Gregorian Year</th><th><a href="https://en.wikipedia.org/wiki/Wheel_of_the_Year#Imbolc">Imbolc</a></th><th><a';
|
||||
fulltable += 'Approximate astronomical <a href="https://en.wikipedia.org/wiki/Wheel_of_the_Year">Wheel of the Year</a> - ';
|
||||
if (timeoutput == 'erisian') fulltable += '<a href="https://discordia.fandom.com/wiki/Erisian_Time">Erisian time</a></br>';
|
||||
else fulltable += '<b>' + timeoutput + '</b> (<a href="https://en.wikipedia.org/wiki/Coordinated_Universal_Time">Coordinated Universal Time</a>)<br>';
|
||||
fulltable += '<a href="https://en.wikipedia.org/wiki/Tropical_year">Tropical year</a> - ' + ( ( VernalEquinox2022 - VernalEquinox2021 ) / 1000 / 60 / 60 / 24 ) + " days (view source for details)</caption>";
|
||||
fulltable += '<tr><th>';
|
||||
if (timeoutput == 'erisian') fulltable += 'YOLD';
|
||||
else fulltable += 'Gregorian Year';
|
||||
fulltable += '</th><th><a href="https://en.wikipedia.org/wiki/Wheel_of_the_Year#Imbolc">Imbolc</a></th><th><a';
|
||||
fulltable += ' href="https://en.wikipedia.org/wiki/Wheel_of_the_Year#Vernal_Equinox_.28Ostara.29">Ostara</a></th><th>';
|
||||
fulltable += '<a href="https://en.wikipedia.org/wiki/Wheel_of_the_Year#Beltane">Beltane</a></th><th><a href="https://en.wikipedia.org/wiki/';
|
||||
fulltable += 'Wheel_of_the_Year#Midsummer_.28Litha.29">Midsummer</a></th><th><a href="https://en.wikipedia.org/wiki/';
|
||||
fulltable += 'Wheel_of_the_Year#Lammas.2FLughnasadh">Lughnasadh</a></th><th><a href="https://en.wikipedia.org/wiki/';
|
||||
fulltable += 'Wheel_of_the_Year#Midsummer_.28Litha.29">Kupala</a></th><th><a href="https://en.wikipedia.org/wiki/';
|
||||
fulltable += 'Wheel_of_the_Year#Lammas.2FLughnasadh">Lunasa</a></th><th><a href="https://en.wikipedia.org/wiki/';
|
||||
fulltable += 'Wheel_of_the_Year#Autumnal_equinox_.28Mabon.29">Mabon</a></th><th><a href="https://en.wikipedia.org/wiki/Wheel_of_the_Year#Samhain">';
|
||||
fulltable += 'Samhain</a></th><th><a href="https://en.wikipedia.org/wiki/Wheel_of_the_Year#Midwinter_.28Yule.29">Yule</a></th></tr>';
|
||||
|
||||
if (timeoutput == 'erisian') UTC = 0;
|
||||
|
||||
for (var i = 1; i <= 17; i++) {
|
||||
var current = new Date ( VernalEquinox2021.getTime() + ( UTC * 60 * 60 * 1000 ) - ( ( VernalEquinox2022.getTime() - VernalEquinox2021.getTime() ) * (7 - i) ) );
|
||||
if (current.getYear() == now.getYear()) fulltable += '<tr class = "currentyear">';
|
||||
else if (i % 2 == 0 ) fulltable += '<tr class = "even">';
|
||||
else fulltable += '<tr>'
|
||||
fulltable += tableRow(current) + "</tr>";
|
||||
else fulltable += '<tr class = "odd">'
|
||||
fulltable += tableRow(current, timeoutput) + "</tr>";
|
||||
}
|
||||
|
||||
fulltable += "</table>";
|
||||
return fulltable;
|
||||
}
|
||||
|
||||
var defaultTable = makeTable(0, "UTC-0");
|
||||
// var currentdate = new Date();
|
||||
// var utcoffmin = -(currentdate.getTimezoneOffset()/60);
|
||||
var defaultTable = makeTable(0, "erisian");
|
||||
document.getElementById("soltable").innerHTML = defaultTable;
|
||||
|
||||
</script>
|
||||
|
||||
<br><p align="center"><a href="https://gitlab.com/zlax/solarwheeloftheyear">source code</a></p>
|
||||
<br><p align="center"><a href="https://en.wikipedia.org/wiki/Wheel_of_the_Year"><img src="0.1.0_octosol.png" alt="Octosol by DougInAMug"></a></p>
|
||||
<br><p align="center"><a href="https://en.wikipedia.org/wiki/Wheel_of_the_Year"><img src="0.5.0_octosol.png" alt="Octosol by DougInAMug"></a></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user