<p>An answer to point 1)</p>

<p><code>{{ location.hours[now|date('w')].open &lt; now and location.hours[now|date('w')].close &gt; now ? 'Open now' : 'Closed' }}</code></p>

<p>And that same logic can be used to resolve issue 2)</p>

CC BY-SA 3.0
2017-06-14T04:44:36.443Z
2017-06-14T04:44:36.443Z
Darren Wood
<p>I'm wanting to do two things <a href="https://github.com/craftcms/store-hours" rel="nofollow noreferrer">with this great plugin</a>, but am having a bit of a mind-melt...</p>

<p>1) I'd like to show the current state; e.g. Closing soon; Open now; Closed; Opening Soon</p>

<p>2) I'd like to show the current day highlight:</p>

<p>Sunday:    11:00 AM - 05:00 PM</p>

<p>Monday:    10:00 AM - 08:00 PM</p>

<p>Tuesday:   10:00 AM - 08:00 PM</p>

<p>Wednesday: 10:00 AM - 08:00 PM</p>

<p><strong>Thursday:  10:00 AM - 08:00 PM</strong></p>

<p>Friday:    10:00 AM - 08:00 PM</p>

<p>Saturday:  10:00 AM - 07:00 PM</p>

<p>Thanks!</p>

<datetime>
Store Hours: show current open/closed state
# Store Hours: show current open/closed state

(Asked by: username_0 on 2017-05-25)

I'm wanting to do two things [with this great plugin](https://github.com/craftcms/store-hours), but am having a bit of a mind-melt...

1) I'd like to show the current state; e.g. Closing soon; Open now; Closed; Opening Soon

2) I'd like to show the current day highlight:

Sunday: 11:00 AM - 05:00 PM

Monday: 10:00 AM - 08:00 PM

Tuesday: 10:00 AM - 08:00 PM

Wednesday: 10:00 AM - 08:00 PM

**Thursday: 10:00 AM - 08:00 PM**

Friday: 10:00 AM - 08:00 PM

Saturday: 10:00 AM - 07:00 PM

Thanks!

**Tags:** datetime


---

## 1 answers

### Answer by username_0 on 2017-06-14. Score: 2 | Accepted answer

An answer to point 1)

`{{ location.hours[now|date('w')].open < now and location.hours[now|date('w')].close > now ? 'Open now' : 'Closed' }}`

And that same logic can be used to resolve issue 2)


---

