Compare two dates in a loop

Author Message

Patrice DUCLAUD

Monday 02 May 2005 8:48:48 am

How to compare two dates ? i'd like to do something with an object when his attribute (date) is greater than today, but i don't really know the right syntax

something like that :


{let Result=fetch('content','list',
            hash('parent_node_id,$node.node_id')}  
{section loop=$:Result 
         show=le(currentdate(),
   $:item.object.data_map.date_attribute.data_int)}
       ... some code ...
{/section}     
{/let}

Thank for any solution

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 20 2025 05:12:34
Script start
Timing: Jan 20 2025 05:12:34
Module start 'layout'
Timing: Jan 20 2025 05:12:34
Module start 'content'
Timing: Jan 20 2025 05:12:35
Module end 'content'
Timing: Jan 20 2025 05:12:35
Script end

Main resources:

Total runtime1.1291 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 589.1563152.6250
Module start 'layout' 0.00600.0031 741.781339.4453
Module start 'content' 0.00911.1185 781.2266399.6094
Module end 'content' 1.12750.0015 1,180.83598.1641
Script end 1.1291  1,189.0000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.3233160.0002
Check MTime0.00150.1364160.0001
Mysql Total
Database connection0.00100.092510.0010
Mysqli_queries1.091896.6971460.0237
Looping result0.00040.0347440.0000
Template Total1.093496.820.5467
Template load0.00230.199420.0011
Template processing1.091296.641120.5456
Template load and register function0.00020.018110.0002
states
state_id_array0.00170.151410.0017
state_identifier_array0.00170.151120.0009
Override
Cache load0.00180.156270.0003
Sytem overhead
Fetch class attribute can translate value0.00090.076210.0009
Fetch class attribute name0.00080.069110.0008
XML
Image XML parsing0.00010.009210.0001
class_abstraction
Instantiating content class attribute0.00000.000410.0000
General
dbfile0.00060.0563100.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
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 6
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs