This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Developer » Date datatype formating
expandshrink

Date datatype formating

Date datatype formating

Tuesday 20 May 2003 6:42:34 am - 4 replies

In a template I currently use
{attribute_view_gui attribute=$content_version.data_map.dateline}
Which produces 2002.12.20 or whatever the user placed in the fields.

My question is can I format these to look like
Friday 20 December 2002

I tried
{attribute_view_gui attribute=$content_version.data_map.dateline.data_int|l10n(date)}
and similar variables without luck.

Can anyone help?

Tuesday 20 May 2003 9:34:42 am

Hi ..

tyr this :

{attribute_view_gui attribute=$content_version.data_map.dateline.data_int|l10n(datetime(custom,"%l %d %F %Y"blunk.gif Emoticon} )}

look at SDK Date : sdk/eztemplate/view/operator_list/

and at php.net :
http://www.php.net/manual/en/function.date.php

Tuesday 20 May 2003 1:53:05 pm

Thanks for the suggestion but it didn't work. I tried lots of variables of your suggestion but without result. It usually doesn't show anything or simply outputs the same numerical dates.

Still open for suggsetions though happy.gif Emoticon

Tuesday 20 May 2003 6:59:51 pm

as i unserstand from ur 1st post, that date format what ur have is 2002.12.20, then u will need to convert it to timestamp to use this option in the template language !
try this

{$content_version.data_map.published|datetime(custom,"%l %d %F %Y"blunk.gif Emoticon}

if u got as u want, then ok, if not then u need to translate the date in the local files/ files maybe !

Thursday 22 May 2003 6:28:40 pm

Thanks for everyones help. For anybody with similar challenges the solutiuon ended up looking like this:

{section show=count($content_version.data_map.dateline.data_int)|gt(1)}
{$content_version.data_map.dateline|l10n(date)}

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from