add dday string
This commit is contained in:
parent
745110f8c6
commit
95bca42183
|
@ -26,6 +26,10 @@ html {
|
||||||
text-transform:uppercase;
|
text-transform:uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
#dtime {
|
#dday {
|
||||||
font-size: 305%;
|
font-size: 55%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dtime {
|
||||||
|
font-size: 303%;
|
||||||
}
|
}
|
||||||
|
|
71
dtime.js
71
dtime.js
|
@ -65,6 +65,9 @@ function dtime(gregorianDate) {
|
||||||
M--;
|
M--;
|
||||||
D = 73;
|
D = 73;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var ddaystr = dday(D,M,d,sttiby);
|
||||||
|
|
||||||
switch (M) {
|
switch (M) {
|
||||||
case 0:
|
case 0:
|
||||||
M = "Chaos";
|
M = "Chaos";
|
||||||
|
@ -104,18 +107,84 @@ function dtime(gregorianDate) {
|
||||||
ds%= 100;
|
ds%= 100;
|
||||||
s = ds;
|
s = ds;
|
||||||
var dtimestr = az(h)+":"+az(m)+":"+az(s);
|
var dtimestr = az(h)+":"+az(m)+":"+az(s);
|
||||||
|
return [ddatestr, dtimestr, ddaystr];
|
||||||
|
}
|
||||||
|
|
||||||
return [ddatestr, dtimestr];
|
function dday(day, season, yearday, sttiby) {
|
||||||
|
var day_list = ["Sweetmorn", "Boomtime", "Pungenday", "Prickle-Prickle", "Setting Orange"];
|
||||||
|
var dweekday = day_list[((yearday-1)%5)];
|
||||||
|
var ddaystr = dweekday;
|
||||||
|
var a_holiday = ["Mungday", "Mojoday", "Syaday", "Zaraday", "Maladay"];
|
||||||
|
var s_holiday = ["Chaoflux", "Discoflux", "Confuflux", "Bureflux", "Afflux"];
|
||||||
|
var m_holiday = ["Chaomas", "Discomas", "Confumas", "Buremas", "Afmas"];
|
||||||
|
var t_holiday = ["Chaosloth", "Discosloth", "Confusloth", "Buresloth", "Afsloth"];
|
||||||
|
var e_holiday = ["Mungeye", "Mojeye", "Syadeye", "Zareye", "Maleye"];
|
||||||
|
if (sttiby) ddaystr = "Celebrate St. Tib's Day";
|
||||||
|
else if (day == 5) ddaystr += ", Celebrate " + a_holiday[season];
|
||||||
|
else if (day == 23) ddaystr += ", Celebrate " + m_holiday[season];
|
||||||
|
else if (day == 27) ddaystr += ", Celebrate " + t_holiday[season];
|
||||||
|
else if (day == 50) ddaystr += ", Celebrate " + s_holiday[season];
|
||||||
|
else if (day == 73) ddaystr += ", Celebrate " + e_holiday[season];
|
||||||
|
else if (season == 0 && day == 8) ddaystr += ", Celebrate Death of Emperor Norton";
|
||||||
|
else if (season == 0 && day == 10) ddaystr += ", Celebrate Backwards/Binary Day";
|
||||||
|
else if (season == 0 && day == 11) ddaystr += ", Celebrate RAW Day";
|
||||||
|
else if (season == 0 && day == 14) ddaystr += ", Celebrate Golden Apple Presentation Day";
|
||||||
|
else if (season == 0 && day == 17) ddaystr += ", Celebrate Joshmas";
|
||||||
|
else if (season == 0 && day == 18) ddaystr += ", Celebrate Pat Pineapple Day";
|
||||||
|
else if (season == 0 && day == 21) ddaystr += ", Celebrate Hug Day";
|
||||||
|
else if (season == 0 && day == 26) ddaystr += ", Celebrate Backwards Day (Traditional)";
|
||||||
|
else if (season == 0 && day == 37) ddaystr += ", Celebrate Aaron Burr’s Birthday";
|
||||||
|
else if (season == 0 && day == 49) ddaystr += ", Celebrate The Mary Day";
|
||||||
|
else if (season == 0 && day == 51) ddaystr += ", Celebrate Pet Loving Day";
|
||||||
|
else if (season == 0 && day == 69) ddaystr += ", Celebrate Head Chicken/Chicken Head Day";
|
||||||
|
else if (season == 0 && day == 72) ddaystr += ", Celebrate Daytime";
|
||||||
|
else if (season == 1 && day == 4) ddaystr += ", Celebrate Grover Cleveland’s Birthday";
|
||||||
|
else if (season == 1 && day == 11) ddaystr += ", Celebrate Discordians for Jesus/Love Your Neighbor Day";
|
||||||
|
else if (season == 1 && day == 18) ddaystr += ", Celebrate Fool’s Day";
|
||||||
|
else if (season == 1 && day == 19) ddaystr += ", Celebrate St. John the Blasphemist’s Day";
|
||||||
|
else if (season == 1 && day == 34) ddaystr += ", Celebrate Omarmas";
|
||||||
|
else if (season == 1 && day == 43) ddaystr += ", Celebrate Universal Ordination Day";
|
||||||
|
else if (season == 1 && day == 68) ddaystr += ", Celebrate Mal-2mas";
|
||||||
|
else if (season == 1 && day == 70) ddaystr += ", Celebrate Jake Day Jr. (DJ)/Day of the Elppin";
|
||||||
|
else if (season == 1 && day == 72) ddaystr += ", Celebrate Towel Day";
|
||||||
|
else if (season == 2 && day == 26) ddaystr += ", Celebrate Imaginary Friend/Captain Tuttle Day";
|
||||||
|
else if (season == 2 && day == 28) ddaystr += ", Celebrate St. George’s Day";
|
||||||
|
else if (season == 2 && day == 30) ddaystr += ", Celebrate Zoog Day";
|
||||||
|
else if (season == 2 && day == 36) ddaystr += ", Celebrate June 31st for Popes";
|
||||||
|
else if (season == 2 && day == 37) ddaystr += ", Celebrate Mid-Year’s Day";
|
||||||
|
else if (season == 2 && day == 40) ddaystr += ", Celebrate X-Day";
|
||||||
|
else if (season == 2 && day == 55) ddaystr += ", Celebrate Mal-2 Day";
|
||||||
|
else if (season == 2 && day == 57) ddaystr += ", Celebrate John Dillinger Day";
|
||||||
|
else if (season == 3 && day == 3) ddaystr += ", Celebrate Multiversal Underwear Day";
|
||||||
|
else if (season == 3 && day == 18) ddaystr += ", Celebrate Festival of Hanky-Panky Spankies";
|
||||||
|
else if (season == 3 && day == 33) ddaystr += ", Celebrate Cat Dancing & Pussyfoot Day";
|
||||||
|
else if (season == 3 && day == 37) ddaystr += ", Celebrate Mass of Planet Eris/Eristotle";
|
||||||
|
else if (season == 3 && day == 39) ddaystr += ", Celebrate St. Mammes's Day";
|
||||||
|
else if (season == 3 && day == 41) ddaystr += ", Celebrate Emperor Norton Proclamation Day";
|
||||||
|
else if (season == 3 && day == 57) ddaystr += ", Celebrate Shamlicht Kids Club Day";
|
||||||
|
else if (season == 3 && day == 59) ddaystr += ", Celebrate Gonkulator Day (Gonculator Day)";
|
||||||
|
else if (season == 3 && day == 60) ddaystr += ", Celebrate Mad Hatter Day";
|
||||||
|
else if (season == 3 && day == 66) ddaystr += ", Celebrate Habeas Corpus Remembrance Day";
|
||||||
|
else if (season == 4 && day == 28) ddaystr += ", Celebrate Ek-sen-triks CluborGuild Day";
|
||||||
|
else if (season == 4 && day == 36) ddaystr += ", Celebrate Spanking Fest";
|
||||||
|
else if (season == 4 && day == 37) ddaystr += ", Celebrate 537 Day, sometimes Turkey Day";
|
||||||
|
else if (season == 4 && day == 40) ddaystr += ", Celebrate Omar’s Day";
|
||||||
|
else if (season == 4 && day == 43) ddaystr += ", Celebrate Day D";
|
||||||
|
else if (season == 4 && day == 46) ddaystr += ", Celebrate Hug Day II";
|
||||||
|
else if (season == 4 && day == 65) ddaystr += ", Celebrate Circlemas";
|
||||||
|
return ddaystr;
|
||||||
}
|
}
|
||||||
|
|
||||||
function go() {
|
function go() {
|
||||||
var iddate = document.getElementById("ddate");
|
var iddate = document.getElementById("ddate");
|
||||||
var idtime = document.getElementById("dtime");
|
var idtime = document.getElementById("dtime");
|
||||||
|
var idday = document.getElementById("dday");
|
||||||
// Current date-time with any time zone offset
|
// Current date-time with any time zone offset
|
||||||
var ddatetime = new Date();
|
var ddatetime = new Date();
|
||||||
ddatetime = dtime(ddatetime);
|
ddatetime = dtime(ddatetime);
|
||||||
iddate.innerHTML = ddatetime[0];
|
iddate.innerHTML = ddatetime[0];
|
||||||
idtime.innerHTML = ddatetime[1];
|
idtime.innerHTML = ddatetime[1];
|
||||||
|
idday.innerHTML = ddatetime[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
</head>
|
</head>
|
||||||
<div id="wrap">
|
<div id="wrap">
|
||||||
<p id="ddate">Need javascript enabled</p>
|
<p id="ddate">Need javascript enabled</p>
|
||||||
|
<p id="dday"></p>
|
||||||
<p id="dtime">00:00:00</p>
|
<p id="dtime">00:00:00</p>
|
||||||
</div>
|
</div>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue