adding th,nd or st to a date

Author Message

Tony Stark

Wednesday 02 April 2008 12:39:03 pm

Hi,
I have the following:

{$this_object.data_map.date.content.timestamp|datetime(custom,"%l %j,")}

Is there a way I can ensure that the date has "th", "nd" or "st" is appended to the data on display?

I cannot see a way to do it on the docs....granted I skimmed over the them!

;-)

Thanks

Tony

Maxime Thomas

Wednesday 02 April 2008 11:07:23 pm

Ah, no...
http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_operators/formatting_and_internationalization/l10n
I guess you may add this as an enhancement or developp your own operator..

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 01:16:15
Script start
Timing: Jan 31 2025 01:16:15
Module start 'layout'
Timing: Jan 31 2025 01:16:15
Module start 'content'
Timing: Jan 31 2025 01:16:15
Module end 'content'
Timing: Jan 31 2025 01:16:15
Script end

Main resources:

Total runtime0.0247 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 589.2578151.2109
Module start 'layout' 0.00490.0035 740.4688220.6875
Module start 'content' 0.00840.0147 961.1563997.7578
Module end 'content' 0.02310.0016 1,958.914129.9922
Script end 0.0247  1,988.9063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002811.4841140.0002
Check MTime0.00124.6994140.0001
Mysql Total
Database connection0.00072.988810.0007
Mysqli_queries0.00207.988530.0007
Looping result0.00000.049210.0000
Template Total0.00114.510.0011
Template load0.00093.514910.0009
Template processing0.00020.987610.0002
Override
Cache load0.00062.356510.0006
General
dbfile0.002911.747680.0004
String conversion0.00000.031940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs