1
0
Fork 0
mirror of https://gitlab.com/Shinobi-Systems/ShinobiCE.git synced 2025-03-09 15:40:15 +00:00

Shinobi CE officially lands on Gitlab

This commit is contained in:
Moe 2018-06-07 23:21:38 -07:00
commit f1406d4eec
431 changed files with 118157 additions and 0 deletions

26
web/libs/js/clock.js Normal file
View file

@ -0,0 +1,26 @@
$(document).ready(function() {
var monthNames = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ];
var dayNames= ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]
var newDate = new Date();
newDate.setDate(newDate.getDate());
$('#time-date').html(dayNames[newDate.getDay()] + " " + newDate.getDate() + ' ' + monthNames[newDate.getMonth()] + ' ' + newDate.getFullYear());
var second=function() {
var seconds = new Date().getSeconds();
document.getElementById("time-sec").innerHTML=( seconds < 10 ? "0" : "" ) + seconds;
}
var minute=function() {
var minutes = new Date().getMinutes();
document.getElementById("time-min").innerHTML=(( minutes < 10 ? "0" : "" ) + minutes);
}
var hour=function() {
var hours = new Date().getHours();
var element=$("#time-hours");
hours = ( hours < 10 ? "0" : "" ) + hours;
if(element.hasClass('twentyfour')&&hours>12){hours=hours-12}
element.html(hours);
}
setInterval(function(){second(),minute(),hour();},1000);
second(),minute(),hour();
});