Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to check if it is the current time day.js

var now = new Date(),
    day = now.getDay(),
    hours = now.getHours();

//Check if day is Mon-Fri
if(0 < day < 6) {
  //check between 9am and 5pm
  if(9 <= hours <= 17) {
     if(hours !== 17 || now.getMinutes() <= 30) {
          //your jQuery code here
     }
  }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #current #time
ADD COMMENT
Topic
Name
8+3 =