add seconds

This commit is contained in:
ivan 2022-05-04 23:54:18 +03:00
parent 560ce05a51
commit 65c1c2610a
2 changed files with 9 additions and 9 deletions

View File

@ -112,7 +112,7 @@ function dtime(gregorianDate,resultar="default") {
return [Y];
break;
case "timeofyold":
var dtimestr = seasonnum+"."+az(D)+" "+h+":"+az(m);
var dtimestr = seasonnum+"."+az(D)+" "+h+":"+az(m)+":"+az(s);
return [dtimestr];
break;
default:

View File

@ -285,7 +285,7 @@ function formatedDate(datein, timeoutput, UTC) {
if (timeoutput == 'erisian') var dateout = dtime(datein, 'timeofyold');
else {
var timein = new Date ( datein.getTime() + ( UTC * 60 * 60 * 1000 ));
var dateout = "" + ("0" + ( timein.getUTCDate())).slice(-2) + "." + ("0" + ( timein.getUTCMonth() + 1)).slice(-2) + " " + ("0" + timein.getUTCHours()).slice(-2) + ":" + ("0" + timein.getUTCMinutes()).slice(-2);
var dateout = ("0" + ( timein.getUTCDate())).slice(-2) + "." + ("0" + ( timein.getUTCMonth() + 1)).slice(-2) + " " + ("0" + timein.getUTCHours()).slice(-2) + ":" + ("0" + timein.getUTCMinutes()).slice(-2) + ":" + ("0" + timein.getUTCSeconds()).slice(-2);
}
return dateout;
}
@ -319,13 +319,13 @@ function makeTable(UTC, timeoutput) {
fulltable += '</caption><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">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>';
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>';
if (timeoutput == 'erisian') UTC = 0;