Finding closed hours in 24 hours format with javascript -


i'm trying alert message if station closed in given hours.

if(ptime<popen || ptime>pclose)     {         alert('station closed in given hours')         return false;     } 

this works if open hour not exceed next day.

for example,

if open hour 08:00 , close hour 23:00 , customer selects 01:00 work , alert customer

but if open hour 06:00 , close hour 02:00 (next day) , customer selects 01:00 alert again it's wrong.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -