javascript - Comparing hours and day with JQuery -


there similar topics on website comparing time have little bit different problem. need compare specified time , now.

i have particular times (days, opening , closing hours shop) example: monday opening 10:00 - closing 6:30 pm

i want create application checks time , informs user: shop open or close, google app.

i need find subtraction's result of , specified time: example if day monday(closing time 6:30) , time 5:20 pm, result 1:10 , means shop open, don't know how can convert 6:30 hours format.

based on information provided, can following:

var time = "6:30",     splittime = time.split(':'),     hours = splittime[0],     minutes = splittime[1]; 

then you'll have variables hours , minutes can use comparison.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -