XF 1.2 Time display format

Andy.N

Well-known member
I'd like to display the time in a format that is a bit controllable. Right now, I have an addon where the time is displayed relatively.
So I have

3 minutes ago
Today at 4:15 AM
Yesterday at 2:39 PM
Monday at 1:23 PM

As you can see, it's hard to control the width of the column for this output as it varies greatly.
Is there a different format that I can apply to this addon only so that they can be more consistent.

Thank you
 
Try removing the "DateTime" class from the HTML (you may need to stop using <xen:datetime /> to accomplish this). It should remove the JavaScript binding that works to make them relative.
 
Try removing the "DateTime" class from the HTML (you may need to stop using <xen:datetime /> to accomplish this). It should remove the JavaScript binding that works to make them relative.
Here is the pice that shows it
{xen:datetime {$post.post_date}}

if I remove xen:datetime, it will display in unix date 12324312312
 
You will either have to write your own helper to format it individually here, or globally change the date format; it runs off of the language settings.
 
Back
Top Bottom