How to check if current time falls within a specific range on a week day using jquery/javascript? -



How to check if current time falls within a specific range on a week day using jquery/javascript? -

when user visits page need check if current time falls between 9:00 , 5:30pm on weekday , display using jquery/javascript.but not sure how can check that.

could please help?

thanks

this should help:

function checktime() { var d = new date(); // current time var hours = d.gethours(), var mins = d.getminutes(); var day = d.getday(); homecoming day >= 1 && day <= 5 && hours >= 9 && (hours < 17 || hours === 17 && mins <= 30); }

javascript jquery datetime weekday

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -