Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check time javascript

var objDate = new Date();
var hours = objDate.getHours();
if(hours >= 12 && hours <= 21){
    document.write('We Are Closed');
}
else{
    document.write('We are Open');
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #time #javascript
ADD COMMENT
Topic
Name
5+3 =