Change date format in Gather posts? | Community
Skip to main content

Change date format in Gather posts?

  • June 28, 2021
  • 2 replies
  • 0 views

Hello,

Is there a way to change the date format in Gather? Currently user posts show the date as "3 days ago" (for example) rather than June 25, 2021.

Thanks.

2 replies

Cheeny
  • June 30, 2021

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.

 


Ifra
  • July 15, 2021

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