Forums / Install & configuration / Date of articles
risto CMS user
Friday 18 November 2005 7:53:09 am
It there a way of spesifying the date of articles?
Gurudutt Verma
Saturday 19 November 2005 3:31:48 am
Hi Risto
What do you want here ?
you can use publish date as
{$node.object.published|l10n(date)}
If you want to add your own date then you have to create another class similar to article and add one more attribute of date datatype and then create template for that as per requirement.
Friday 25 November 2005 4:54:59 am
I wonted to be able to edit the publish date of articles and display it with day.month.year
dd.mm.yyyy25.11.2005
Friday 25 November 2005 5:13:10 am
Hi!
well it is difficult to edit publish date but you can display ti in custom format.
see following links
http://ez.no/products/ez_publish_cms/documentation/development/libraries/ez_template/operators/miscellaneoushttp://ez.no/products/ez_publish_cms/documentation/customization/tips_tricks/date_and_time_formats
try to use something like
{$node.object.published|datetime(custom,"%m %y")}
Monday 28 November 2005 12:59:04 am
Im having problems her:
{$node.object.data_map.utgitt|datetime(custom,"%d %m %Y")}
{$node.object.utgitt|datetime(custom,"%d %m %Y")}
none of these are working. I get 1970 as the yeasr onf 01 01 as day month.
Ćukasz Serwatka
Monday 28 November 2005 1:06:24 am
This is correct, datetime() expect timestamp (unix time format) as input, so with your code returns wrong date.
Use code below:
If utgitt is date datatype:
{$node.object.data_map.utgitt.content.timestamp|datetime('custom','%d %m %Y')}
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog