2

I'm wanting to do two things with this great plugin, 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!

2

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)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.