This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = setInterval(function() { | |
// get the date first | |
var myDate = new Date(); | |
var myDay = myDate.getDay(); | |
// then create a list of days of the week | |
var weekday = ['Sunday', 'Monday', 'Tuesday', | |
'Wednesday', 'Thursday', 'Friday', 'Saturday' | |
]; | |
// then make strings that add "0" in front of 1-digit hrs/mins | |
var dayNum = String(myDate.getDate()).padStart(2, '0'); |