mardi 14 juin 2016

Comparing hours and day with JQuery


There are similar topics on website about comparing time but I have a little bit different problem. I need to compare a specified time and now.

I have some particular times (days, opening and closing hours for a shop) For example: Monday opening 10:00 am - closing 6:30 pm

I want to create an application which checks time and informs to user: shop is open or close, like google app.

I need to find subtraction's result of now and specified time: for example if day is monday(closing time is 6:30) and time is 5:20 pm, result will be 1:10 and it means shop is open, but I don't know how I can convert 6:30 into hours format.


Aucun commentaire:

Enregistrer un commentaire