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
Post a Comment