Change date format in Gather posts?

2 댓글

  • Cheeny Aban
    Zendesk Customer Advocate

    Hi Alexandra,

    The system gives actual dates and after a theme update reverted to the “X days ago” format. You may also edit the dates but that would involve custom theming of your account.

     

    0
  • Ifra Saqlain
    Community Moderator

    Hi Alexander,

    Follow the steps below:

    1). Go to the community post page and find the meta data.

    // Currently you have - X days ago

    <ul class="meta-group meta-group-opposite">
    {{#if post.editor}}
    <li class="meta-data">{{date post.edited_at timeago=true}}</li>
    <li class="meta-data">{{t 'edited'}}</li>
    {{else}}
    <li class="meta-data">{{date post.created_at timeago=true}}</li>
    {{/if}}
    </ul>



    A). After Update as you want - June 25, 2021

    <ul class="meta-group meta-group-opposite">
    {{#if post.editor}}
    <li class="meta-data">{{date post.edited_at format='medium'}}</li>
    <li class="meta-data">{{t 'edited'}}</li>
    {{else}}
    <li class="meta-data">{{date post.created_at format='medium'}}</li>
    {{/if}}
    </ul>


    B). Sort by date - 06/25/2021

    <ul class="meta-group meta-group-opposite">
    {{#if post.editor}}
    <li class="meta-data">{{date post.edited_at format='short'}}</li>
    <li class="meta-data">{{t 'edited'}}</li>
    {{else}}
    <li class="meta-data">{{date post.created_at format='short'}}</li>
    {{/if}}
    </ul>

     

    All formats:

    • short (09/14/2015): A compact format only showing date
    • medium (January 2nd 2016): A date only format displaying full month name
    • long (March 3rd 2015 11:45): A long format displaying full month name and time stamp
    • full (Thursday, June 9th 2016 11:45) : Same as long, but also shows the full name of the day

     

     

    Hope it will help you.

     

    Team

     

     

    0

댓글을 남기려면 로그인하세요.

Zendesk 제공