store-hours
store-hours copied to clipboard
FR: "now open"
Description
Would be nice to have a template variable to check, to see if the store is open atm (not this day, but this very moment).
Just wondering if anyone has managed to code this functionality manually?
This is what we did as a workaround
{% set currentTime = date() %}
{% set todayHours = entry.<Field>.getToday() %}
{% set isOpen = date(todayHours.open|time) < currentTime and date(todayHours.close|time) > currentTime %}