{# LIBRARIES #}

<p>
  This is just a demo for timeago. The data attribute <code>data-alt-timeago</code> should
  be used with a timestamp. The contents of that element will be replaced with a time-ago string.
</p>

<code>
  <xmp class="prismjs">
    <span class="timeago" data-alt-timeago="1673434799">Last updated: x</span>
  </xmp>
</code>

<p>
  <ul>
    <li><b>Time ago is:</b>   <span class="timeago" data-alt-timeago="1673434799">Last updated: x</span></li>
    <li><b>Time ago is:</b> <span class="timeago" data-alt-timeago="{{ "now"|date("U") }}">Last updated: x</span></li>
    <li><b>Time ago is:</b> <span class="timeago" data-alt-timeago="{{ "now"|date_modify("-1 minute")|date("U") }}">Last updated: x</span></li>
    <li><b>Time ago is:</b> <span class="timeago" data-alt-timeago="{{ "now"|date_modify("-1 hour")|date("U") }}">Last updated: x</span></li>
    <li><b>Time ago is:</b> <span class="timeago" data-alt-timeago="{{ "now"|date_modify("-1 day")|date("U") }}">Last updated: x</span></li>
    <li><b>Time ago is:</b> <span class="timeago" data-alt-timeago="{{ "now"|date_modify("-1 week")|date("U") }}">Last updated: x</span></li>
  </ul>
</p>
