aboutsummaryrefslogtreecommitdiff
path: root/Neutron-trunk/widgets/clock/source.php
diff options
context:
space:
mode:
authorGitea <gitea@fake.local>2021-11-10 17:53:50 +0100
committerGitea <gitea@fake.local>2021-11-10 17:53:50 +0100
commit8fabf77b2a7720a357c63817c07035a9908818a0 (patch)
treed689fcac1403e2473010fe80bc337599a78c21a4 /Neutron-trunk/widgets/clock/source.php
parent7b4af63a90a726b98a59b83e53f040a7a566a11d (diff)
downloadelectrode-8fabf77b2a7720a357c63817c07035a9908818a0.tar.gz
electrode-8fabf77b2a7720a357c63817c07035a9908818a0.tar.bz2
electrode-8fabf77b2a7720a357c63817c07035a9908818a0.zip
Update
Diffstat (limited to 'Neutron-trunk/widgets/clock/source.php')
-rw-r--r--Neutron-trunk/widgets/clock/source.php100
1 files changed, 0 insertions, 100 deletions
diff --git a/Neutron-trunk/widgets/clock/source.php b/Neutron-trunk/widgets/clock/source.php
deleted file mode 100644
index 68218e2..0000000
--- a/Neutron-trunk/widgets/clock/source.php
+++ /dev/null
@@ -1,100 +0,0 @@
-<div id="widget-space">
- <div style="text-align: center;"><h3 class="widget-clock-time">00:00:00</h3><span class="widget-clock-date">????? ??? ??????? ????</span></div>
-</div>
-<script>
-
-setInterval(() => {
- time = new Date()
- hours = time.getHours()
- minutes = time.getMinutes()
- seconds = time.getSeconds()
- day = time.getDate()
- month = time.getMonth() + 1
- year = time.getFullYear()
- dow = time.getDay() + 1
- if (hours < 10) {
- hours_str = "0" + hours
- } else {
- hours_str = hours
- }
- if (minutes < 10) {
- minutes_str = "0" + minutes
- } else {
- minutes_str = minutes
- }
- if (seconds < 10) {
- seconds_str = "0" + seconds
- } else {
- seconds_str = seconds
- }
- if (day == 1) {
- day_str = "<?= $lang["widgets"]["clock"]["ordinal"] ?>"
- } else {
- day_str = day
- }
- if (dow == 2) {
- dow_str = "<?= $lang["widgets"]["clock"]["days"][0] ?>"
- }
- if (dow == 3) {
- dow_str = "<?= $lang["widgets"]["clock"]["days"][1] ?>"
- }
- if (dow == 4) {
- dow_str = "<?= $lang["widgets"]["clock"]["days"][2] ?>"
- }
- if (dow == 5) {
- dow_str = "<?= $lang["widgets"]["clock"]["days"][3] ?>"
- }
- if (dow == 6) {
- dow_str = "<?= $lang["widgets"]["clock"]["days"][4] ?>"
- }
- if (dow == 7) {
- dow_str = "<?= $lang["widgets"]["clock"]["days"][5] ?>"
- }
- if (dow == 1) {
- dow_str = "<?= $lang["widgets"]["clock"]["days"][6] ?>"
- }
- if (month == 1) {
- month_str = "<?= $lang["widgets"]["clock"]["months"][0] ?>"
- }
- if (month == 2) {
- month_str = "<?= $lang["widgets"]["clock"]["months"][1] ?>"
- }
- if (month == 3) {
- month_str = "<?= $lang["widgets"]["clock"]["months"][2] ?>"
- }
- if (month == 4) {
- month_str = "<?= $lang["widgets"]["clock"]["months"][3] ?>"
- }
- if (month == 5) {
- month_str = "<?= $lang["widgets"]["clock"]["months"][4] ?>"
- }
- if (month == 6) {
- month_str = "<?= $lang["widgets"]["clock"]["months"][5] ?>"
- }
- if (month == 7) {
- month_str = "<?= $lang["widgets"]["clock"]["months"][6] ?>"
- }
- if (month == 8) {
- month_str = "<?= $lang["widgets"]["clock"]["months"][7] ?>"
- }
- if (month == 9) {
- month_str = "<?= $lang["widgets"]["clock"]["months"][8] ?>"
- }
- if (month == 10) {
- month_str = "<?= $lang["widgets"]["clock"]["months"][9] ?>"
- }
- if (month == 11) {
- month_str = "<?= $lang["widgets"]["clock"]["months"][10] ?>"
- }
- if (month == 12) {
- month_str = "<?= $lang["widgets"]["clock"]["months"][11] ?>"
- }
- Array.from(document.getElementsByClassName('widget-clock-time')).forEach((e) => {
- e.innerHTML = hours_str + ":" + minutes_str + ":" + seconds_str
- })
- Array.from(document.getElementsByClassName('widget-clock-date')).forEach((e) => {
- e.innerHTML = dow_str + " " + day_str + " " + month_str + " " + year
- })
-}, 100)
-
-</script> \ No newline at end of file