4 Commits

Author SHA1 Message Date
0697c2392a readme.txt update 2024-06-12 15:38:19 +03:00
235b11259a customisable seconds in the widget 2024-06-12 15:29:31 +03:00
ea64a55218 shorting dtime.js 2024-06-12 13:57:10 +03:00
0832e1504e holyday fixes 2024-06-12 13:02:39 +03:00
3 changed files with 95 additions and 203 deletions

View File

@@ -3,7 +3,7 @@
Plugin Name: Discordian Date Function Plugin Name: Discordian Date Function
Plugin URI: https://is3.soundragon.su/discordian-date-function Plugin URI: https://is3.soundragon.su/discordian-date-function
Description: Convert dates in Wordpress to customizable Discordian dates and time (decimal). Also, this plugin provides shortcode and widget used to display the current erisian date with notification of 70 holidays. Based on the Discordian Date plugin by Dan Johnson. Description: Convert dates in Wordpress to customizable Discordian dates and time (decimal). Also, this plugin provides shortcode and widget used to display the current erisian date with notification of 70 holidays. Based on the Discordian Date plugin by Dan Johnson.
Version: 2.555 Version: 2.5555
Author: ivan zlax Author: ivan zlax
Author URI: https://is3.soundragon.su/about Author URI: https://is3.soundragon.su/about
*/ */
@@ -195,25 +195,23 @@ class Discordian_Date_Widget extends WP_Widget {
} elseif ($dseason==0 && $dday==21) { } elseif ($dseason==0 && $dday==21) {
$holiday = " Celebrate Hug Day."; $holiday = " Celebrate Hug Day.";
} elseif ($dseason==0 && $dday==26) { } elseif ($dseason==0 && $dday==26) {
$holiday = " Celebrate Backwards Day (Traditional)."; $holiday = " Celebrate yaD sdrawkcaB, Traditional.";
} elseif ($dseason==0 && $dday==37) { } elseif ($dseason==0 && $dday==37) {
$holiday = " Celebrate Aaron Burrs Birthday."; $holiday = " Celebrate Aaron Burr's Birthday.";
} elseif ($dseason==0 && $dday==49) {
$holiday = " Celebrate The Mary Day.";
} elseif ($dseason==0 && $dday==51) { } elseif ($dseason==0 && $dday==51) {
$holiday = " Celebrate Pet Loving Day."; $holiday = " Celebrate Pet Loving Day.";
} elseif ($dseason==0 && $dday==69) { } elseif ($dseason==0 && $dday==69) {
$holiday = " Celebrate Head Chicken/Chicken Head Day."; $holiday = " Celebrate Chicken Head Day.";
} elseif ($dseason==0 && $dday==72) { } elseif ($dseason==0 && $dday==72) {
$holiday = " Celebrate Daytime."; $holiday = " Celebrate Daytime.";
} elseif ($dseason==1 && $dday==4) { } elseif ($dseason==1 && $dday==4) {
$holiday = " Celebrate Grover Clevelands Birthday."; $holiday = " Celebrate Grover Cleveland's Birthday.";
} elseif ($dseason==1 && $dday==11) { } elseif ($dseason==1 && $dday==11) {
$holiday = " Celebrate Discordians for Jesus/Love Your Neighbor Day."; $holiday = " Celebrate Discordians for Jesus/Love Your Neighbor Day.";
} elseif ($dseason==1 && $dday==18) { } elseif ($dseason==1 && $dday==18) {
$holiday = " Celebrate Fools Day."; $holiday = " Celebrate Fool's Day.";
} elseif ($dseason==1 && $dday==19) { } elseif ($dseason==1 && $dday==19) {
$holiday = " Celebrate St. John the Blasphemists Day."; $holiday = " Celebrate St. John the Blasphemist's Day.";
} elseif ($dseason==1 && $dday==34) { } elseif ($dseason==1 && $dday==34) {
$holiday = " Celebrate Omarmas."; $holiday = " Celebrate Omarmas.";
} elseif ($dseason==1 && $dday==43) { } elseif ($dseason==1 && $dday==43) {
@@ -221,19 +219,17 @@ class Discordian_Date_Widget extends WP_Widget {
} elseif ($dseason==1 && $dday==68) { } elseif ($dseason==1 && $dday==68) {
$holiday = " Celebrate Mal-2mas."; $holiday = " Celebrate Mal-2mas.";
} elseif ($dseason==1 && $dday==70) { } elseif ($dseason==1 && $dday==70) {
$holiday = " Celebrate Jake Day Jr. (DJ)/Day of the Elppin."; $holiday = " Celebrate Day of the Elppin/Defenestration of Prague Day.";
} elseif ($dseason==1 && $dday==72) { } elseif ($dseason==1 && $dday==72) {
$holiday = " Celebrate Towel Day."; $holiday = " Celebrate Towel Day.";
} elseif ($dseason==2 && $dday==26) { } elseif ($dseason==2 && $dday==26) {
$holiday = " Celebrate Imaginary Friend/Captain Tuttle Day."; $holiday = " Celebrate Imaginary Friend.";
} elseif ($dseason==2 && $dday==28) { } elseif ($dseason==2 && $dday==28) {
$holiday = " Celebrate St. Georges Day."; $holiday = " Celebrate St. George's Day.";
} elseif ($dseason==2 && $dday==30) { } elseif ($dseason==2 && $dday==30) {
$holiday = " Celebrate Zoog Day."; $holiday = " Celebrate Zoog Day.";
} elseif ($dseason==2 && $dday==36) {
$holiday = " Celebrate June 31st for Popes.";
} elseif ($dseason==2 && $dday==37) { } elseif ($dseason==2 && $dday==37) {
$holiday = " Celebrate Mid-Years Day."; $holiday = " Celebrate Mid-Year's Day.";
} elseif ($dseason==2 && $dday==40) { } elseif ($dseason==2 && $dday==40) {
$holiday = " Celebrate X-Day."; $holiday = " Celebrate X-Day.";
} elseif ($dseason==2 && $dday==55) { } elseif ($dseason==2 && $dday==55) {
@@ -242,36 +238,42 @@ class Discordian_Date_Widget extends WP_Widget {
$holiday = " Celebrate John Dillinger Day."; $holiday = " Celebrate John Dillinger Day.";
} elseif ($dseason==3 && $dday==3) { } elseif ($dseason==3 && $dday==3) {
$holiday = " Celebrate Multiversal Underwear Day."; $holiday = " Celebrate Multiversal Underwear Day.";
} elseif ($dseason==3 && $dday==10) {
$holiday = " Celebrate St. Cecil Day.";
} elseif ($dseason==3 && $dday==18) { } elseif ($dseason==3 && $dday==18) {
$holiday = " Celebrate Festival of Hanky-Panky Spankies."; $holiday = " Celebrate Spanking Fest.";
} elseif ($dseason==3 && $dday==33) { } elseif ($dseason==3 && $dday==33) {
$holiday = " Celebrate Cat Dancing & Pussyfoot Day."; $holiday = " Celebrate Pussyfoot Day.";
} elseif ($dseason==3 && $dday==37) { } elseif ($dseason==3 && $dday==37) {
$holiday = " Celebrate Mass of Planet Eris/Eristotle."; $holiday = " Celebrate Mass of Planet Eris/Mass of Eristotle.";
} elseif ($dseason==3 && $dday==39) { } elseif ($dseason==3 && $dday==39) {
$holiday = " Celebrate St. Mammes's Day."; $holiday = " Celebrate St. Mammes's Day.";
} elseif ($dseason==3 && $dday==41) { } elseif ($dseason==3 && $dday==41) {
$holiday = " Celebrate Emperor Norton Proclamation Day."; $holiday = " Celebrate Emperor Norton Proclamation Day.";
} elseif ($dseason==3 && $dday==55) {
$holiday = " Celebrate Feast of St. John Blasphemist.";
} elseif ($dseason==3 && $dday==57) { } elseif ($dseason==3 && $dday==57) {
$holiday = " Celebrate Shamlicht Kids Club Day."; $holiday = " Celebrate Shamlicht Kids Club Day.";
} elseif ($dseason==3 && $dday==59) { } elseif ($dseason==3 && $dday==59) {
$holiday = " Celebrate Gonkulator Day (Gonculator Day)."; $holiday = " Celebrate Gonculator Day.";
} elseif ($dseason==3 && $dday==60) { } elseif ($dseason==3 && $dday==60) {
$holiday = " Celebrate Mad Hatter Day."; $holiday = " Celebrate Mad Hatter Day.";
} elseif ($dseason==3 && $dday==66) { } elseif ($dseason==3 && $dday==66) {
$holiday = " Celebrate Habeas Corpus Remembrance Day."; $holiday = " Celebrate Habeas Corpus Remembrance Day.";
} elseif ($dseason==4 && $dday==17) {
$holiday = " Celebrate Pope Night.";
} elseif ($dseason==4 && $dday==28) { } elseif ($dseason==4 && $dday==28) {
$holiday = " Celebrate Ek-sen-triks CluborGuild Day."; $holiday = " Celebrate Ek-sen-triks CluborGuild Day.";
} elseif ($dseason==4 && $dday==36) {
$holiday = " Celebrate Spanking Fest.";
} elseif ($dseason==4 && $dday==37) { } elseif ($dseason==4 && $dday==37) {
$holiday = " Celebrate 537 Day, sometimes Turkey Day."; $holiday = " Celebrate 537 Day.";
} elseif ($dseason==4 && $dday==40) { } elseif ($dseason==4 && $dday==40) {
$holiday = " Celebrate Omars Day."; $holiday = " Celebrate Omar's Day.";
} elseif ($dseason==4 && $dday==43) { } elseif ($dseason==4 && $dday==43) {
$holiday = " Celebrate Day D."; $holiday = " Celebrate Day D.";
} elseif ($dseason==4 && $dday==46) { } elseif ($dseason==4 && $dday==46) {
$holiday = " Celebrate Hug Day II."; $holiday = " Celebrate Hug Day II.";
} elseif ($dseason==4 && $dday==56) {
$holiday = " Celebrate Agnostica.";
} elseif ($dseason==4 && $dday==65) { } elseif ($dseason==4 && $dday==65) {
$holiday = " Celebrate Circlemas."; $holiday = " Celebrate Circlemas.";
} }
@@ -281,10 +283,17 @@ class Discordian_Date_Widget extends WP_Widget {
$body = apply_filters('widget_text', $instance['body']); $body = apply_filters('widget_text', $instance['body']);
ob_start(); ob_start();
echo "<div class=\"discordian_date_func\" style=\"width:100%;text-align:center;font-size:18px;line-height:36px;padding-top:40px;padding-bottom:40px;\"> Today is "; echo "<div class=\"discordian_date_func\" style=\"width:100%;text-align:center;font-size:18px;line-height:36px;padding-top:40px;padding-bottom:40px;\">";
if (get_option('dtime_widget')) {
if (get_option('dtime_convert'))
echo "<script type=\"text/javascript\">var eastertime = true;</script>";
if (get_option('dtime_widgetsec'))
echo "<script type=\"text/javascript\">var widgetsec = true;</script>";
echo "<h1 style=\"font-size: 255%\" id=\"dtime\"></h1>";
}
echo "Today is ";
echo get_ddate($content, $format, "now")."."; echo get_ddate($content, $format, "now").".";
if ($holiday) echo "<br><b>".$holiday."</b>"; if ($holiday) echo "<br><b>".$holiday."</b>";
if (get_option('dtime_widget')) echo "<br><h1 style=\"font-size: 255%\" id=\"dtime\">5:55:55</h1>";
echo "</div>"; echo "</div>";
$body2 = ob_get_contents(); $body2 = ob_get_contents();
ob_end_clean(); ob_end_clean();
@@ -369,6 +378,10 @@ function ddatefunc_admin() {
update_option('dtime_widget', "1"); update_option('dtime_widget', "1");
else else
update_option('dtime_widget', "0"); update_option('dtime_widget', "0");
if (isset($_POST['dtime_widgetsec_checkbox']))
update_option('dtime_widgetsec', "1");
else
update_option('dtime_widgetsec', "0");
echo '<div id="setting-error-settings_updated" class="updated settings-error"><p><b>'.__('Settings saved.').'</b></p></div>'; echo '<div id="setting-error-settings_updated" class="updated settings-error"><p><b>'.__('Settings saved.').'</b></p></div>';
} }
?> ?>
@@ -431,7 +444,7 @@ Examples<br>
</td> </td>
</tr> </tr>
<tr valign="top"> <tr valign="top">
<th scope="row">Use Erisian start of the day - <a href="https://www.reddit.com/r/Time/comments/fhys8v/erisian_time/">starts 5 Christian hours later than the day in London</a>:</th> <th scope="row">Use Erisian start of the day - <a href="https://discordia.fandom.com/wiki/Erisian_Time">starts 5 Christian hours later than the day in London</a>:</th>
<td> <td>
<fieldset> <fieldset>
<legend class="screen-reader-text"> <legend class="screen-reader-text">
@@ -456,6 +469,19 @@ Examples<br>
</fieldset> </fieldset>
</td> </td>
</tr> </tr>
<tr valign="top">
<th scope="row">Display seconds in erisian time clock in the widget:</th>
<td>
<fieldset>
<legend class="screen-reader-text">
<span>Seconds in the widget</span>
</legend>
<label for="users_can_register">
<input name="dtime_widgetsec_checkbox" id="users_can_register" type="checkbox" value="1" <?php if(get_option('dtime_widgetsec')==1) { echo 'checked="checked"'; } ?>>
</label>
</fieldset>
</td>
</tr>
</table> </table>
<div class="submit"> <div class="submit">
<input name="save" type="submit" class="button-primary" value="<?php echo __('Save Cganges'); ?>" /> <input name="save" type="submit" class="button-primary" value="<?php echo __('Save Cganges'); ?>" />
@@ -480,6 +506,7 @@ function ddatefunc_deinstall() {
delete_option('dtimefunc_change'); delete_option('dtimefunc_change');
delete_option('dtime_convert'); delete_option('dtime_convert');
delete_option('dtime_widget'); delete_option('dtime_widget');
delete_option('dtime_widgetsec');
} }
function ddatefunc_init() { function ddatefunc_init() {
@@ -493,6 +520,7 @@ add_option('ddatefunc_change', '1');
add_option('dtimefunc_change', '1'); add_option('dtimefunc_change', '1');
add_option('dtime_convert', '1'); add_option('dtime_convert', '1');
add_option('dtime_widget', '1'); add_option('dtime_widget', '1');
add_option('dtime_widgetsec', '1');
add_filter('plugin_action_links', 'ddatefunc_settings', 10, 2); add_filter('plugin_action_links', 'ddatefunc_settings', 10, 2);
add_action('admin_menu', 'ddatefunc_add_admin'); add_action('admin_menu', 'ddatefunc_add_admin');

199
dtime.js
View File

@@ -1,193 +1,50 @@
/* /*
* https://gitlab.com/zlax/dtime-js
* based on: * based on:
* * https://gitlab.com/zlax/dtime-js
* REAL-TIME CLOCK (c) 2009 por Tiago Madeira (http://tiagomadeira.com/)
* Idealizado por Santaum (http://santaum.org/)
*
* All Hail Eris!
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
function az(x) { function addZero(numeral) {
if (x < 10) if (numeral < 10)
return "0"+x; return "0"+numeral;
return x; return numeral;
}
function ly(Y) {
return (Y % 4 == 0 && !(Y % 100 == 0 && Y % 400 != 0));
}
function dy(D, M, Y) {
var dm = Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
if (ly(Y)) {
dm[1] = 29;
}
var d = D;
for (var i = 0; i < M-1; i++) {
d+= dm[i]
}
return d;
} }
function dtime(gregorianDate,resultar="default") { function dtime(gregorianDate,resultar="default") {
if (typeof eastertime != "undefined") {
// Easter Island Winter Time Zone offset (-5*60*60*1000) // Easter Island Winter Time Zone offset (-5*60*60*1000)
var date = new Date(gregorianDate.getTime()-18000000); var date = new Date(gregorianDate.getTime()-18000000);
var christianMSDay = date.valueOf() % 86400000;
var D = date.getUTCDate();
var M = date.getUTCMonth()+1;
var Y = date.getUTCFullYear();
var d = dy(D, M, Y);
var sttiby = 0;
if (ly(Y)) {
if (d == 60) {
sttiby = 1;
} else if (d > 60) {
d--;
}
}
M = Math.floor(d/73);
D = d % 73;
if (D == 0) {
M--;
D = 73;
}
var ddaystr = dday(D,M,d,sttiby);
var seasonnum = M+1;
switch (M) {
case 0:
M = "Chaos";
break;
case 1:
M = "Discord";
break;
case 2:
M = "Confusion";
break;
case 3:
M = "Bureaucracy";
break;
case 4:
M = "Aftermath";
break;
default:
M = "fnord";
}
Y+= 1166;
if (sttiby) {
var ddatestr = "St. Tib's Day, "+Y+" YOLD";
} else { } else {
var ddatestr = M+" "+az(D)+", "+Y+" YOLD"; // Christian Time Zone calculation
var date = new Date(gregorianDate.getTime());
var h = date.getHours();
var m = date.getMinutes();
var s = date.getSeconds();
var ms = date.getMilliseconds();
var christianMSDay = h*3600000+m*60000+s*1000+ms;
} }
var h = date.getUTCHours(); var erisianSecondsDay = (christianMSDay/864);
var m = date.getUTCMinutes(); var hour = Math.floor(erisianSecondsDay/10000);
var s = date.getUTCSeconds(); erisianSecondsDay %= 10000;
var ms = date.getUTCMilliseconds(); var minute = Math.floor(erisianSecondsDay/100);
var e = h*3600000+m*60000+s*1000+ms; erisianSecondsDay %= 100;
var ds = Math.round(e/864); var second = Math.floor(erisianSecondsDay);
h = Math.floor(ds/10000);
ds%= 10000;
m = Math.floor(ds/100);
ds%= 100;
s = ds;
switch (resultar) { switch (resultar) {
case "shortsec": case "seconds":
return [ddatestr, h+":"+az(m), ":"+az(s), ddaystr]; return hour+":"+addZero(minute)+":"+addZero(second);
break;
case "ddatetime":
return [Y, seasonnum, D, h, m, s];
break;
case "dtimeonly":
return h+":"+az(m)+":"+az(s);
break; break;
default: default:
var dtimestr = h+":"+az(m)+":"+az(s); return hour+":"+addZero(minute);
return [ddatestr, dtimestr, ddaystr];
break; break;
} }
} }
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 == 51) ddaystr += ", Celebrate Pet Loving Day";
else if (season == 0 && day == 69) ddaystr += ", Celebrate 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./Day of the Elppin";
else if (season == 1 && day == 72) ddaystr += ", Celebrate Towel Day";
else if (season == 2 && day == 26) ddaystr += ", Celebrate Imaginary Friend 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 == 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 == 10) ddaystr += ", Celebrate St. Cecil Day";
else if (season == 3 && day == 18) ddaystr += ", Celebrate Spanking Fest";
else if (season == 3 && day == 33) ddaystr += ", Celebrate Pussyfoot Day";
else if (season == 3 && day == 37) ddaystr += ", Celebrate Mass of Planet Eris/Mass of 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 == 55) ddaystr += ", Celebrate Feast of St. John Blasphemist";
else if (season == 3 && day == 57) ddaystr += ", Celebrate Shamlicht Kids Club Day";
else if (season == 3 && day == 59) ddaystr += ", Celebrate 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 == 17) ddaystr += ", Celebrate Pope Night";
else if (season == 4 && day == 28) ddaystr += ", Celebrate Ek-sen-triks CluborGuild Day";
else if (season == 4 && day == 37) ddaystr += ", Celebrate 537 Day";
else if (season == 4 && day == 40) ddaystr += ", Celebrate Omar 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 == 56) ddaystr += ", Celebrate Agnostica";
else if (season == 4 && day == 65) ddaystr += ", Celebrate Circlemas";
return ddaystr;
}
function go() { function go() {
document.getElementById("dtime").innerHTML = dtime(new Date(), "dtimeonly"); if (typeof widgetsec != "undefined")
document.getElementById("dtime").innerHTML = dtime(new Date(), "seconds");
else
document.getElementById("dtime").innerHTML = dtime(new Date());
} }
window.onload = function() { window.onload = function() {

View File

@@ -3,13 +3,13 @@ Contributors: zlaxyi
Donate link: https://is3.soundragon.su/discordian-date-function Donate link: https://is3.soundragon.su/discordian-date-function
Tags: date, time, discordian, erisian, widget, eris, discordia, calendar, ddate, dtime Tags: date, time, discordian, erisian, widget, eris, discordia, calendar, ddate, dtime
Requires at least: 2.0 Requires at least: 2.0
Tested up to: 6.0 Tested up to: 6.6
Stable tag: trunk Stable tag: trunk
License: DWTWL 2.55 License: DWTWL 2.55
License URI: https://soundragon.su/license/license.html License URI: https://soundragon.su/license/license.html
This plugin provides Erisian (Discordian) dates and time in Wordpress. This plugin provides Erisian (Discordian) dates and time in Wordpress.
Also provides shortcode and widget which displays the current date according to the Discordian calendar, with notification of more than 70 holidays and clock. Also provides shortcode and widget which displays the clock, current date according to the Discordian calendar, with notification of more than 70 holidays.
== Description == == Description ==
@@ -17,7 +17,7 @@ This plugin allows WordPress to easily show customizable Erisian dates and time
The Discordian Date Function plugin provides a widget which will display the current Erisian time and date according to the [Discordian calendar](http://en.wikipedia.org/wiki/Discordian_calendar). This functional based on the Discordian Date plugin by Dan Johnson. The Discordian Date Function plugin provides a widget which will display the current Erisian time and date according to the [Discordian calendar](http://en.wikipedia.org/wiki/Discordian_calendar). This functional based on the Discordian Date plugin by Dan Johnson.
And you can add the shortcode [today_ddate] in posts or pages for show the Discordian date of today. Also you can add the shortcode [today_ddate] in posts or pages for show the Discordian date of today.
== Installation == == Installation ==
@@ -41,6 +41,13 @@ Feel free to ask any questions about this plugin at the [Discordian Date Functio
== Changelog == == Changelog ==
= 2.5555 =
*Release Date - 17th day of Confusion 3190*
* Customisable seconds in the widget
* Specification of holidays
* Minor fixes
= 2.555 = = 2.555 =
*Release Date - 52nd day of Confusion, 3188* *Release Date - 52nd day of Confusion, 3188*
@@ -71,5 +78,5 @@ Feel free to ask any questions about this plugin at the [Discordian Date Functio
== Upgrade Notice == == Upgrade Notice ==
= 2.555 = = 2.5555 =
This version is actual. This version is actual.