<xen:date>

Valhalla

Well-known member
I'm trying to display a date and time in an absolute format (not relative) using a UNIX time value. For what reason might this expression not work in a template?

Code:
<xen:date time="{$conversation.message_date}" />

The {$conversation.message_date} value is a UNIX time stamp.

I expected this to work, but I get an error upon saving the template.
 
There are a few variations on xen syntax for date/time.

This should work:
Code:
{xen:datetime $conversation.message_date, absolute}
 
Funny question.

In some countries we want d.m.Y, but for US we have m.d.Y;
Is there a function for that? Probably not, because from where it should know which language we speak.
So i have to do this with a phrase. But how i can pass the values of date timestamp, "d.w.Y" to a phrase, please?
At least d and w needs to be passed to one phrase to change the position for englisch and french for example.
 
Top Bottom