solarwheeloftheyear/index.html

354 lines
27 KiB
HTML
Raw Normal View History

2017-05-03 10:19:00 +00:00
<!DOCTYPE html>
2019-08-04 22:49:09 +00:00
<!-- https://gitlab.com/zlax/solarwheeloftheyear -->
2022-07-16 14:16:32 +00:00
<html xmlns="http://www.w3.org/1999/xhtml">
2017-05-03 10:19:00 +00:00
<head>
2022-05-04 20:31:15 +00:00
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
2017-05-03 10:19:00 +00:00
<!--
;
;=
.=; .X
... ;;.
; .; ;.=
== =. = . ;
. X=. ;. = = ;.
+ .;;; .. .; .. .
+. ;..; . = =
X; .; .= = .; = =. .
=;; ;. .+. = = ; . .=
; ; = =. = X = ; ;;
.;.; ;. ;. = .. ; = ;;
= = ; =. = ; ;. = = ;
+ .= = =. = ;; ; . .. ;
; .; = =. = = .; . = .;
; = = .= = ; ; .; .. ;=
;. = ;. ; . .= ; .; = ;.
= .= .= .; .. ; = .+ ; ;
= .; ; ;; .. ;. .; .X ;.
; ;. =. = ;. .; ;. .X ;; ;
. =. .; .. .= =. + = = .; +
+. .. .; ; . ; + ;. ; .= =
.+. = .; = ; ; ; = + ;. .
;; + .; X .; ; = = .X ;. =
;... .. .+ ; = ; X . .+ =. X
; .. = + . .. ; ; + .; ;. ;
.; .; ; .; ; X ; ; ; .; ; ..
.. ... ;. .; + .;; . . . ; =. .;;
; ;; ; ;; ; ==. ;=; = = ; ;;.;=.
;. ;; = = ;. =;. ;= X ;. .; .+. =.
; .=. ;. ;.; .=. ;= ;.. . ..; =
.. =+ = .;; +. ;= ..= = ... =
; .=; ; .+. ;. ;= += .. .=. =.
;. =; ; X. + ;= =; = .;. .;
; .= ; ;+ + ;. ;+ ;. =. =
= .. + ; = ; ;. ;= ; = =
;; ; =.; = .; = .; .. =
.; ; ;.; ; .X = + =; .;
; =. .. ;=. .= + ; .. .+
; ;. = =X =. ; .=; +
. .= ;. ;; . X; ;.
.; ;;. ; =. ;+ =
; ; ; ; =. .+ = ==;;;
= ;.=. .; = ;;;;; + =. ;;+=; ;;;..=.
.. == . .. = .;+M##########M;;. + .. .;;X=. .=;
;. ;=.; ; .= ;X###M++++==++++M##M+;.==. ;. .= ..=.. ;=
= ..=. ; . =M##X=;...........;==+M#M##= = .= . .;.
; .;. ; =##M+.................;M#####+ .= .;= ;=
; .;.. ;M##+.................=X########+ .=; ; .=.
; .+= =M#M;.................X###########M. .X.. .;
; =+ X#M=.................+#############M#= =X. =;
; .+. X#M;................=M##############=M#; =; .;.
= == M#M................;X################X;MM; .+. .=
=. . X#M................+###M#=############X..M#; .= .=
.= +#M................X###MM#+#############..;M#. .=
=; ;##;...............+####=#M=#############...;#M ;;
.= M#=................X###.;#==#############;...;#+ ;.
=; +#X.................###X X#=X#############.....X#. =.
.== .MM=................X###M.## X############M.....;#+ .;
.;. M#X..........;=;.;X######X#X X############X......X#. ;.
.. ;;;;=+X;;====.. .##........;XM###M##########X X############+......;#X ;= ...=;;;;.....
;..=;; .=+. X#X......;X##################.X############........M#. ;;=; ;==;.. ..;.+=;.;;
;= ;. .##;.....XM###################XM###########=........;#= .++.; ;;.;=+=;.
.+;. =#M....=M############;+#M#################X..........MX .;X.. ... .;+X=
..=. X#+..;M##############X;#XX###############X=..........=#. .= ;;;
;=. .M#.;M################M.X#==#############X;X..........;#= .+..
= .##X###################;;#X.;XM########M=.=+...........MX .;;
.=. .#####M#M##############=.X#+...=X##XXX=...==...........X#. .;.
;.;. .=X;. M####+MM+##############X.;#MX+...;X;......=+...........X#; .=.
==.. X####M;#=X##############X..;++XX...X;......;+.......+...X#; ..X
.=.;; =#####=;#.M##############+......=.;+=........X=.....+=...X#; ;.;
.; .;;;;;;;;;;;+=; .M####.+M ###############=........X=.......;M#M+=;=X=....X#; ==.
..==. M###+X= ##############M........=M......;+M+#;;+==......X#; ..;=+
..;. +#####= ##############X.......;X+....;+#M=+#;..........X#; ;;.;==;;. ;==.
;.; +#####X ##############;..XX+=+M+...;X##M=;+M...........X#; ...=;
.=. =######;#############MM+X;;XMX...=M###+=;;MM...........X#; .=..
;.; .#XX###M############+.+=........=###M+;;;=#+...........XM ;;.
.;. .##.=##############+.........=XX###M=;;;;+#+...........MX ..;.
;. M#;.=M##########M=........;X#####X=;;;;;M#=..........=#= .;
;; =#+...+X######M+.........;M####M+;;;;;;+##...........+#. ..;
=. ;#M.....;=======........+M###X+;;;;;;;=M#M...........MM ..==
;= .;+ M#=.........=;=X=....;M##M==;;;;;;;;=MM#X..........;#= .=+. ... ....
.=. ;== =#X.............+X.;+#MX=;;;;;;;;;;+#= M+..........M#. ..=+==;=++;
.+ =X= M#;.............XXX+=;;;;;;;;;;;=X#= =#..........;#X == .;.
;; .. ;;;= =#X.............=#M+=;;;;;;;;;=+MX. =#;..........X#. ;X;. ..=
=. .;===;.==;; .;;. .= M#;............;X+M#XX+=;;=+X#X= +M=..........;#X =;== ;=.;
=. ;X=..;;;;;;;;;;. ;; ;#M............;=..=M##MMMM#+. ;MM;...........MM. .==.;+; .=+; ;
+=.;. ;. X#=...........+;...;=M####; .+MX;...........=#+ .=. .;;. ..;; ;;;
. ;; .MM;.........;M.......;=XMM+MMX;........=...;MX .=
=. ;MM;......;+M;...........;==...........=..;M# =;
;. ;#M;....++=..........................;;..X#; .=
.= =#M.................................X.;M#= ; ;.
.; .= =MM;..............................===##= ;= ;.
;; =; ;#M=.............................X+##; =. ..
.. = ;M#X;................+;.......;M##M; ;; ..
;; ;; +##X;...............++=...=X##M= =. ..
;. .+. ;X##X=..............;=+MM###+. =; .;
= ;+. .XM#MX;;;.........;;XM#MX. ;.=. .;
; ..;+ +X####M+====+MM###X= ; ;;; ;.
;. ... ; +. .;;XX######MX;;. . ; ..=. ;
;. ;. ; =. ...... = ;; == =
.= ..=. ; .+ .= ;. =;; ..
.. ;; ; ; X. .; ; ..; ;.
+. . ;=+ ; ++ ;; . + ;
;. .;;;; ; ..= . . += . =. ..
;;=;=. ;; ;. . ;. .; ; .;; ; .; ;
. ; ; ; X + ; ;;= = .; ..
= .; ; .= .= ; ; = =. .. .= ;
;. ;; ; == .; + ;. . .. ; ==.
= .; = ..; =; X + ; .= . ;=
; . . ; ; =; = =; ; =. = =
.. .;. ; ..; .; =; .; . .= ;
; .; ; . + ;.; . ;. ; =. .
.. . ; = + . . .; .; ; ... ;
; .; ; ; ; . . . . . .. ;; ..
.. = .. . ; . . ; ;; = ; ;. =
;.= = ;. ; = . ; . .; . ;; =
.+. ; ;. .. + ; . ;. . ;; .
. = ;. ; ; ; . = ; = ;.=
; ;. .. . ; ;. ;. ; ; .=.
; .. ; + ; .. . .; .+
; ; .; ; ; ; . . +
= = ; .; ; ;. ; . ;
. ; = . ; ; . .
.; =. ; = . = ; ; ;. .
= .. ; ; ; = ; ; ; =
; .; + + =. . ; + ; ;
.. ;; ; . . .. ; X
.==. . . ; ; = ;
.+. . = ; = ; . +
= . + .; .. ; ; .
; . = . ; ; ;
; ; ; = ;..
. ; .. .. ;.=
. ; . =.. =.
. ;; .;
;.; = .; +
.; ..
+X = ;=
+ . .;
. .
=;
.
-->
<link rel="icon" href="favicon.ico" type="image/x-icon"><link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="anthrstlsht.css">
2022-05-04 17:01:58 +00:00
<script type="text/javascript" src="dtime.js"></script>
2022-07-08 19:19:06 +00:00
<script type="text/javascript" src="vernal_equinox.js"></script>
<script type="text/javascript" src="autumnal_equinox.js"></script>
<script type="text/javascript" src="southern_solstice.js"></script>
<script type="text/javascript" src="northern_solstice.js"></script>
2017-05-03 10:19:00 +00:00
<title>solar wheel of the year</title>
</head>
<body>
2022-05-04 20:31:15 +00:00
<br><p align="center"><input type="button" onclick="document.getElementById('soltable').innerHTML = makeTable(0, 'erisian');" value="Erisian time"/></p>
2022-07-09 11:19:29 +00:00
<p align="center"><input type="button" onclick="document.getElementById('soltable').innerHTML = makeTable(0, 'auto');" value="Christian time"/>:<br>
<div align = "center" id="utcbuttons"></div></p>
2024-06-20 21:11:11 +00:00
2022-07-09 11:19:29 +00:00
<script type="text/javascript">
2024-06-20 21:11:11 +00:00
2022-07-09 11:19:29 +00:00
const utcs = { "UTC-11" : "-11", "UTC-10" : "-10", "UTC-9" : "-9",
"UTC-8" : "-8", "UTC-7" : "-7", "UTC-6" : "-6", "UTC-5" : "-5",
"UTC-4" : "-4", "UTC-3:30" : "-3.5", "UTC-3" : "-3", "UTC-0" : "0",
"UTC+1" : "1", "UTC+2" : "2", "UTC+3" : "3", "UTC+3:30" : "3.5",
"UTC+5" : "5", "UTC+5:30" : "5.5", "UTC+6" : "6", "UTC+6:30" : "6.5",
"UTC+7" : "7", "UTC+8" : "8", "UTC+9" : "9", "UTC+9:30" : "9.5",
"UTC+10" : "10", "UTC+11" : "11" };
var buttons = "";
var counter = 0;
2024-06-21 07:23:25 +00:00
var nextholiday = false;
var currentholiday = false;
2022-07-09 11:19:29 +00:00
for (var u in utcs) {
counter += 1;
buttons += '<input type="button" onclick="document.getElementById(' + "'soltable'" + ').innerHTML = makeTable(';
buttons += utcs[u] + ", '" + u + "');" + '" value="' + u + '"/>'
if (counter % 5 == 0) buttons += "<br>";
}
document.getElementById("utcbuttons").innerHTML = buttons;
2024-06-20 21:11:11 +00:00
2022-07-09 11:19:29 +00:00
</script>
2024-06-20 21:11:11 +00:00
2022-07-09 08:04:41 +00:00
<div align = "center" id="soltable"></div><br><div align = "center" id="oneyearrow"></div>
2017-05-03 10:19:00 +00:00
<script type="text/javascript">
2022-05-04 20:31:15 +00:00
function formatedDate(datein, timeoutput, UTC) {
2022-05-04 17:01:58 +00:00
if (timeoutput == 'erisian') var dateout = dtime(datein, 'timeofyold');
2022-05-04 20:31:15 +00:00
else {
var timein = new Date ( datein.getTime() + ( UTC * 60 * 60 * 1000 ));
2022-07-16 14:11:32 +00:00
var dateout = ("0" + ( timein.getUTCDate())).slice(-2) + "." + ("0" + ( timein.getUTCMonth() + 1)).slice(-2) + " ";
dateout += ("0" + timein.getUTCHours()).slice(-2) + ":" + ("0" + timein.getUTCMinutes()).slice(-2) + ":" + ("0" + timein.getUTCSeconds()).slice(-2);
2022-05-04 20:31:15 +00:00
}
2017-05-03 10:19:00 +00:00
return dateout;
}
2022-07-09 08:04:41 +00:00
function oneyearChange(value) {
if (timeout == "erisian") outyear = value - 1166;
else outyear = value;
document.getElementById("oneyearrow").innerHTML = makeOneYearRow();
}
function makeOneYearRow() {
var fullrow = "<table><tr>";
fullrow += tableRow(outyear, timeout, utcoff, true);
fullrow += "</tr></table>";
return fullrow;
}
function tableRow(cy, timeoutput, UTC, oneyearinp = false) {
2017-05-03 10:19:00 +00:00
var stringout = "<td>";
2022-07-09 08:04:41 +00:00
if (oneyearinp) {
if (timeoutput == 'erisian') {
cury = cy + 1166; miny = 1583 + 1166; maxy = 2999 + 1583;
} else {
cury = cy; miny = 1583; maxy = 2999;
}
2022-07-16 14:11:32 +00:00
stringout += '<input type="number" name="oneyearinput" value="' + cury + '" min="' + miny;
stringout += '" max="' + maxy + '" step="1" size="5" onchange="oneyearChange(this.value)">';
2022-07-09 08:04:41 +00:00
} else {
if (timeoutput == 'erisian') stringout += cy + 1166;
else stringout += cy;
}
2022-05-04 20:31:15 +00:00
var Imbolc = new Date(ss[cy-1].getTime() + ((ve[cy].getTime() - ss[cy-1].getTime()) / 2));
2024-06-21 07:23:25 +00:00
stringout += '<td class="even im">' + formatedDate(Imbolc, timeoutput, UTC) + "</td>";
stringout += '<td class="os">' + formatedDate(ve[cy], timeoutput, UTC) + "</td>";
2022-05-04 20:31:15 +00:00
var Beltane = new Date(ve[cy].getTime() + ((ns[cy].getTime() - ve[cy].getTime()) / 2));
2024-06-21 07:23:25 +00:00
stringout += '<td class="even be">' + formatedDate(Beltane, timeoutput, UTC) + "</td>";
stringout += '<td class="ku">' + formatedDate(ns[cy], timeoutput, UTC) + "</td>";
2022-05-04 20:31:15 +00:00
var Lughnasadh = new Date(ns[cy].getTime() + ((ae[cy].getTime() - ns[cy].getTime()) / 2));
2024-06-21 07:23:25 +00:00
stringout += '<td class="even lu">' + formatedDate(Lughnasadh, timeoutput, UTC) + "</td>";
stringout += '<td class="ma">' + formatedDate(ae[cy], timeoutput, UTC) + "</td>";
2022-05-04 20:31:15 +00:00
var Samhain = new Date(ae[cy].getTime() + ((ss[cy].getTime() - ae[cy].getTime()) / 2));
2024-06-21 07:23:25 +00:00
stringout += '<td class="even sa">' + formatedDate(Samhain, timeoutput, UTC) + "</td>";
stringout += '<td class="yu">' + formatedDate(ss[cy], timeoutput, UTC) + "</td>";
if (cy == now.getFullYear()) {
var wheeldaystime = [ ss[cy-1].getTime(), Imbolc.getTime(), ve[cy].getTime(), Beltane.getTime(),
ns[cy].getTime(), Lughnasadh.getTime(), ae[cy].getTime(), Samhain.getTime(),
ss[cy].getTime(), ve[cy+1].getTime()]
var wheeldays = [ "prev", "im", "os", "be", "ku", "lu", "ma", "sa", "yu", "next" ]
Number.prototype.isBetween = function (a, b) {
return a <= this && this <= b;
};
for (let i = 1; i < 10; i++) {
if ((Date.now()).isBetween(wheeldaystime[i-1], wheeldaystime[i]))
nextholiday = i;
}
if ((wheeldaystime[nextholiday] - (Date.now())) < 86400000)
currentholiday = wheeldays[nextholiday];
if (((Date.now()) - wheeldaystime[nextholiday-1]) < 43200000)
currentholiday = wheeldays[nextholiday-1];
nextholiday = wheeldays[nextholiday];
}
return stringout;
2017-05-03 10:19:00 +00:00
}
2022-05-04 17:01:58 +00:00
function makeTable(UTC, timeoutput) {
2017-05-03 10:19:00 +00:00
2022-07-09 11:19:29 +00:00
if (timeoutput == 'auto') {
UTC = -(now.getTimezoneOffset()/60);
Object.keys(utcs).forEach(key => {
if (UTC == utcs[key]) timeoutput = key;
})
}
2022-07-09 08:04:41 +00:00
utcoff = UTC; timeout = timeoutput;
2017-05-03 10:19:00 +00:00
var fulltable = "<table><caption>";
2022-07-16 14:11:32 +00:00
fulltable += 'Accurate (according to <a href="https://www.imcce.fr">IMCCE</a>) astronomical ';
fulltable += '<a href="https://en.wikipedia.org/wiki/Wheel_of_the_Year">Wheel of the Year</a> - ';
2022-07-09 11:19:29 +00:00
if (timeoutput == 'erisian') {
fulltable += '<a href="https://discordia.fandom.com/wiki/Erisian_Time">Erisian time</a></br>';
window.location.hash = "";
} else {
fulltable += '<b>' + timeoutput + '</b> (<a href="https://en.wikipedia.org/wiki/Coordinated_Universal_Time">Coordinated Universal Time</a>)<br>';
window.location.hash = "#" + timeoutput;
}
2022-05-04 20:31:15 +00:00
fulltable += '</caption><tr><th>';
2022-05-04 17:01:58 +00:00
if (timeoutput == 'erisian') fulltable += 'YOLD';
else fulltable += 'Gregorian Year';
2022-05-04 20:54:18 +00:00
fulltable += '</th><th><a href="https://en.wikipedia.org/wiki/Wheel_of_the_Year#Imbolc_(Candlemas)">Imbolc</a></th><th><a';
fulltable += ' href="https://en.wikipedia.org/wiki/Wheel_of_the_Year#Spring_Equinox_(Ostara)">Ostara</a></th><th>';
fulltable += '<a href="https://en.wikipedia.org/wiki/Wheel_of_the_Year#Beltane_(May_Eve)">Beltane</a></th><th><a href="https://en.wikipedia.org/wiki/';
fulltable += 'Wheel_of_the_Year#Summer_Solstice_(Litha)">Kupala</a></th><th><a href="https://en.wikipedia.org/wiki/';
fulltable += 'Wheel_of_the_Year#Lughnasadh_(Lammas)">Lunasa</a></th><th><a href="https://en.wikipedia.org/wiki/';
fulltable += 'Wheel_of_the_Year#Autumn_Equinox_(Mabon)">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#Winter_Solstice_(Yule)">Yule</a></th></tr>';
2017-05-03 10:19:00 +00:00
2022-05-04 17:01:58 +00:00
if (timeoutput == 'erisian') UTC = 0;
2022-07-08 19:19:06 +00:00
for (var i = 1; i <= 15; i++) {
2022-05-04 20:31:15 +00:00
var currentyear = (now.getFullYear() - 8 + i);
if (currentyear == now.getFullYear()) fulltable += '<tr class = "currentyear">';
2024-06-21 07:23:25 +00:00
else if (currentyear == (now.getFullYear() + 1)) fulltable += '<tr class = "odd nextyear">';
else if (i % 2 == 0 ) fulltable += '<tr class = "even">';
else fulltable += '<tr class = "odd">'
2022-05-04 20:31:15 +00:00
fulltable += tableRow(currentyear, timeoutput, UTC) + "</tr>";
2017-05-03 10:19:00 +00:00
}
fulltable += "</table>";
2022-07-09 08:04:41 +00:00
document.getElementById("oneyearrow").innerHTML = makeOneYearRow();
2017-05-03 10:19:00 +00:00
return fulltable;
}
2022-07-09 11:19:29 +00:00
var now = new Date();
2022-07-09 08:04:41 +00:00
var utcoff = 0;
2024-06-21 09:17:23 +00:00
var timeout = "auto";
2022-07-09 11:19:29 +00:00
if (window.location.hash.slice(0,4) == "#UTC") {
if (utcs[window.location.hash.slice(1,9)]) {
utcoff = utcs[window.location.hash.slice(1,9)]
timeout = window.location.hash.slice(1,9);
}
} else if (window.location.hash.slice(0,5) == "#auto") timeout = "auto";
var outyear = (now.getFullYear() - 100);
2022-07-09 08:04:41 +00:00
var defaultTable = makeTable(utcoff, timeout);
2017-05-03 10:19:00 +00:00
document.getElementById("soltable").innerHTML = defaultTable;
</script>
2024-06-20 21:11:11 +00:00
<br><p align="center"><font size="6">&#9660;</font></a>
<br><a href="https://en.wikipedia.org/wiki/Wheel_of_the_Year"><img id="wheel" src="0.5.0_octosol.png" alt="Octosol by DougInAMug"></a></p>
<script type="text/javascript">
2024-06-21 07:23:25 +00:00
if (nextholiday == "next") var nextselector = ".nextyear>." + nextholiday;
else var nextselector = ".currentyear>." + nextholiday;
document.querySelector(nextselector).style.color = "yellow";
2024-06-21 09:17:23 +00:00
if (currentholiday) {
var curselector = ".currentyear>." + currentholiday;
document.querySelector(curselector).style.color = "red";
}
2024-06-20 21:11:11 +00:00
const dayOfYear = date => Math.floor((date - new Date(date.getFullYear(),
0, 0)) / (1000 * 60 * 60 * 24));
var daynumber = dayOfYear(new Date());
var degree = Math.round((360 / 365) * (daynumber + 10));
var rotatestring = "rotate(" + degree + "deg)"
document.getElementById("wheel").style.transform = rotatestring;
</script>
2019-08-04 22:49:09 +00:00
<br><p align="center"><a href="https://gitlab.com/zlax/solarwheeloftheyear">source code</a></p>
2017-05-03 10:19:00 +00:00
</body>
2017-05-03 10:26:09 +00:00
</html>