I am trying to display Open or Closed based on company time for this particular date using Javascript. I am using a Listify theme on WordPress that customers can list in their business. They have the opportunity to set working hours for each day of the week. I want to be able to use the data that is stored within the range, and then determine if the business is open or closed, and display this.
Here is the code that I still have:
<p class="business-hour" itemprop="openingHours" content="Monday 8am-17pm"> <span class="day">Monday</span> <span class="business-hour-time"> <span class="start">8:30 am</span> โ <span class="end">5:30 pm</span> </span> </p>
This is only for one day, but you should get this idea. I searched for hours to find something like this. All I can find is coding with specific watches already defined in Javascript. I want to be able to use classes to start and end to create open or closed. Is it possible? I would think so. I just can't do it right.
I'm doing it here, but it seems like I canโt understand anything: http://codepen.io/tetonhiker/pen/KzxRzg
Thanks!
source share