Skip to content

Commit 1b31544

Browse files
committed
test oneapi ci job Tue Mar 28 18:21:17 PDT 2023
Signed-off-by: michael vincerra <michael.vincerra@intel.com>
1 parent 7d111fc commit 1b31544

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

src/docs/_static/script.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ document.addEventListener('DOMContentLoaded', function () {
1717
fetchData().then((data) => { /* */
1818
renderUi(data); /* */
1919
console.log(data)
20+
getDateTime()
2021
});
2122
});
2223

@@ -57,3 +58,36 @@ function renderCards(data) {
5758
}
5859
})
5960
}
61+
62+
function getDateTime() {
63+
var now = new Date();
64+
var year = now.getFullYear();
65+
var month = now.getMonth()+1;
66+
var day = now.getDate();
67+
var hour = now.getHours();
68+
var minute = now.getMinutes();
69+
var second = now.getSeconds();
70+
if(month.toString().length == 1) {
71+
month = '0'+month;
72+
}
73+
if(day.toString().length == 1) {
74+
day = '0'+day;
75+
}
76+
if(hour.toString().length == 1) {
77+
hour = '0'+hour;
78+
}
79+
if(minute.toString().length == 1) {
80+
minute = '0'+minute;
81+
}
82+
if(second.toString().length == 1) {
83+
second = '0'+second;
84+
}
85+
var dateTime = year+'/'+month+'/'+day+' '+hour+':'+minute+':'+second;
86+
return dateTime;
87+
}
88+
89+
// example usage: realtime clock
90+
setInterval(function(){
91+
currentTime = getDateTime();
92+
document.getElementById("digital-clock").innerHTML = currentTime;
93+
}, 1000);

src/docs/_templates/base.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,7 @@
2121
</div>
2222
{% set script_files = script_files + ["/src/docs/_static/script.js"] %}
2323
</body>
24+
<footer>
25+
<div id="digital-clock"></div>
26+
</footer>
2427
</html>

0 commit comments

Comments
 (0)