l10n hacks

Author Message

Andrew Kelly

Friday 21 July 2006 4:42:53 am

Hi all,

any of you have a hack to l10n so that the output is somewhere in between a 'date' and a 'short date'.

What I'm after is 'date', without the day of week prepended. And if possible,
without the 0 padding.

'date' delivers: Friday 06 February 2004
What I'd like is: 06 February 2004
Or even better: 6 February 2004

Any suggestions?

Andy

Marko Žmak

Friday 21 July 2006 5:28:30 am

Try looking at the datetime() operator:

http://ez.no/doc/ez_publish/technical_manual/3_8/reference/template_operators/formatting_and_internationalization/datetime

With it you can format time any way you like.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Andrew Kelly

Friday 21 July 2006 6:41:46 am

Outstanding, thank you very much.

Andy

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 19 2025 06:02:21
Script start
Timing: Jan 19 2025 06:02:21
Module start 'layout'
Timing: Jan 19 2025 06:02:21
Module start 'content'
Timing: Jan 19 2025 06:02:22
Module end 'content'
Timing: Jan 19 2025 06:02:22
Script end

Main resources:

Total runtime0.8079 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 589.0313152.6094
Module start 'layout' 0.00520.0024 741.640639.3984
Module start 'content' 0.00760.7990 781.0391543.6250
Module end 'content' 0.80660.0013 1,324.664112.2031
Script end 0.8079  1,336.8672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4119160.0002
Check MTime0.00130.1608160.0001
Mysql Total
Database connection0.00070.088610.0007
Mysqli_queries0.754293.3497570.0132
Looping result0.00110.1374550.0000
Template Total0.774895.920.3874
Template load0.00200.248220.0010
Template processing0.772895.647320.3864
Template load and register function0.00010.011810.0001
states
state_id_array0.00120.145810.0012
state_identifier_array0.00170.209020.0008
Override
Cache load0.00170.2086220.0001
Sytem overhead
Fetch class attribute can translate value0.00050.066820.0003
Fetch class attribute name0.00080.102050.0002
XML
Image XML parsing0.00210.265020.0011
class_abstraction
Instantiating content class attribute0.00000.001560.0000
General
dbfile0.00340.4259240.0001
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs