Created
November 3, 2016 21:42
-
-
Save vartana/f5a4fec6b7a48b73b77d43ddb774034a to your computer and use it in GitHub Desktop.
This file contains 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 d = new Date(); | |
var n = d.getHours(); //get the current local time's hour in military time (1..23) | |
//If the time is greater than or equal to 8AM or less than or equal to 2am | |
if (n >= 8 || n <= 2) { | |
//set background color to X | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment