Answers.Body: <p>Ended up just repurposing code from the plugin templates. This is working fine for me:</p>
  <pre><code>{% if seomatic.site.identity.localBusinessOpeningHours|length %}
     {% macro day(value, day) %}
        &lt;tr&gt;
           &lt;th&gt;{{ craft.app.locale.getWeekDayName(day) }}&lt;/th&gt;
           &lt;td&gt;{{ value[day].open.date|date('g:ia')|replace({':00' : ''}) }}-{{ value[day].close.date|date('g:ia')|replace({':00' : ''}) }}&lt;/td&gt;
        &lt;/tr&gt;
     {% endmacro %}
     {% from _self import day %}
  
     {% set startDay = currentUser.getPreference(&quot;weekStartDay&quot;) ?? craft.app.config.general.defaultWeekStartDay %}
     {% set days = (startDay..6) %}
  
     {% if startDay != 0 %}
        {% set days = days|merge(0..(startDay -1)) %}
     {% endif %}
  
     &lt;table&gt;
        {% for i in days %}
           {{ day(seomatic.site.identity.localBusinessOpeningHours, i) }}
        {% endfor %}
     &lt;/table&gt;
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-25T08:51:35.450Z
Answers.LastActivityDate: 2022-04-25T08:51:35.450Z
Answers.UserDisplayName: Ian Ebden
Body: <p>I could use some help outputting opening hours from SEOmatic's Site Settings/Identity. The docs aren't clear on this, and the example at <a href="https://github.com/nystudio107/craft-seomatic/issues/843" rel="nofollow noreferrer">https://github.com/nystudio107/craft-seomatic/issues/843</a> doesn't work for me. Any help much appreciated.</p>
  
Tags: <craft3><plugin-seomatic>
Title: Outputting Opening Hours in SEOmatic
ThreadText: # Outputting Opening Hours in SEOmatic
  
  (Asked by: username_0 on 2022-04-22)
  
  I could use some help outputting opening hours from SEOmatic's Site Settings/Identity. The docs aren't clear on this, and the example at <https://github.com/nystudio107/craft-seomatic/issues/843> doesn't work for me. Any help much appreciated.
  
  **Tags:** craft3, plugin-seomatic
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-04-25. Score: 1 | Accepted answer
  
  Ended up just repurposing code from the plugin templates. This is working fine for me:
  
  ```
  {% if seomatic.site.identity.localBusinessOpeningHours|length %}
     {% macro day(value, day) %}
        <tr>
           <th>{{ craft.app.locale.getWeekDayName(day) }}</th>
           <td>{{ value[day].open.date|date('g:ia')|replace({':00' : ''}) }}-{{ value[day].close.date|date('g:ia')|replace({':00' : ''}) }}</td>
        </tr>
     {% endmacro %}
     {% from _self import day %}
  
     {% set startDay = currentUser.getPreference("weekStartDay") ?? craft.app.config.general.defaultWeekStartDay %}
     {% set days = (startDay..6) %}
  
     {% if startDay != 0 %}
        {% set days = days|merge(0..(startDay -1)) %}
     {% endif %}
  
     <table>
        {% for i in days %}
           {{ day(seomatic.site.identity.localBusinessOpeningHours, i) }}
        {% endfor %}
     </table>
  {% endif %}
  
  ```
  
  
  ---
  
  