<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[confronto date]]></title><description><![CDATA[<p dir="auto">Ciao a tutti.<br />
Come faccio a confrontare la data di un articolo e la data attuale?<br />
ex se data articolo inferiore una settimana echo "news"<br />
se la data articolo superiore una settimana echo ""<br />
Grazie a tutti</p>
]]></description><link>https://dev.connect.gt/topic/155133/confronto-date</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 05:03:10 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/155133.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 17 Jul 2011 09:24:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to confronto date on Fri, 29 Jul 2011 07:36:40 GMT]]></title><description><![CDATA[<p dir="auto">Basterebbe solo <strong>if</strong> in questo caso <strong>else</strong> non serve a niente.</p>
]]></description><link>https://dev.connect.gt/post/1015536</link><guid isPermaLink="true">https://dev.connect.gt/post/1015536</guid><dc:creator><![CDATA[mikslap]]></dc:creator><pubDate>Fri, 29 Jul 2011 07:36:40 GMT</pubDate></item><item><title><![CDATA[Reply to confronto date on Sun, 17 Jul 2011 15:17:22 GMT]]></title><description><![CDATA[<p dir="auto">magari puo' essere utile postare come ho risolto.... anche se magari ci sono soluzioni migliori</p>
<pre><code class="language-php">&lt;?php
     $array = explode("-", $row_offerte['data']);
     $giorno = $array[2];
     $mese = $array[1];
     $anno = $array[0];
     $differenza= date ("d-m-Y",mktime(0,0,0,date("m"),date("d")-7,date("Y")));
     $array1 = explode("-", $differenza);
     $giorno1 = $array1[0];
     $mese1 = $array1[1];
     $anno1 = $array1[2];
                   
                    $data_annuncio = mktime(0,0,0, $mese, $giorno, $anno);          
 $data1 = mktime(0,0,0, $mese1, $giorno1, $anno1);
if ($data_annuncio &gt; $data1)
            
     {
                    
            echo "data annuncio". $row_offerte['data'];
                   echo "&lt;img src=\"../images/offerte_speciali/New.jpg\" width=\"37\" height=\"38\"&gt;";
     }
     else
     {     
                    echo "";
     
     }
      ?&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/post/1015597</link><guid isPermaLink="true">https://dev.connect.gt/post/1015597</guid><dc:creator><![CDATA[patatrac]]></dc:creator><pubDate>Sun, 17 Jul 2011 15:17:22 GMT</pubDate></item><item><title><![CDATA[Reply to confronto date on Sun, 17 Jul 2011 14:58:53 GMT]]></title><description><![CDATA[<p dir="auto">ho provato anche cosi'<br />
io volevo che venisse segnato con immagine new solo gli articoli piu recenti di una settimana...<br />
in questo modo invece confronta le date e dice<br />
se la tua data e' superiore a una settimana ti metto tutti gli articoli con more.jpg<br />
se invece la tua data e' inferiore una settimana ti metto tutti gi articoli co immagine new.jpg.<br />
Ame questo non sta bene perche io vorrei che new.jpg comparisse solo negli articoli postati questa settimana....</p>
<pre><code class="language-php">&lt;?php
     $array = explode("-", $row_offerte['data']);
     $giorno = $array[2];
     $mese = $array[1];
     $anno = $array[0];
                    $differenza= date ("d-m-Y",mktime(0,0,0,date("m"),date("d")-7,date("Y")));
                    $data_annuncio = mktime(0,0,0, $mese, $giorno, $anno);          
if ($data_annuncio &gt; $differenza)
            
     {
                    
  echo $giorno.''.$mese.''.$anno;
                    
                   echo "&lt;img src=\"../images/offerte_speciali/New.jpg\" width=\"37\" height=\"38\"&gt;";
     }
     else
     {     
                    echo "&lt;img src=\"../images/offerte_speciali/more.jpg\" width=\"37\" height=\"38\"&gt;";
     
     }
      ?&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/post/1015596</link><guid isPermaLink="true">https://dev.connect.gt/post/1015596</guid><dc:creator><![CDATA[patatrac]]></dc:creator><pubDate>Sun, 17 Jul 2011 14:58:53 GMT</pubDate></item><item><title><![CDATA[Reply to confronto date on Sun, 17 Jul 2011 11:49:09 GMT]]></title><description><![CDATA[<p dir="auto">ho provato anche cosi ma nulla</p>
<pre><code class="language-php">&lt;?php
                     $calcolo= date ("d-m-Y",mktime(0,0,0,date("m"),date("d")-1,date("Y")));
                     $data =(date("d-m-Y"));
                     $data_annuncio = $row_offerte['data'];
                    $array = explode("-", $row_offerte['data']);
$giorno = $array[2];
$mese = $array[1];
$anno = $array[0];
if (mktime(0,0,0, date("m"), date("d"), date("Y")) == mktime(0,0,0, $mese, $giorno, $anno))
 
                  
     {
                    
  echo $row_offerte['data'];
                    
                   echo "&lt;img src=\"../images/offerte_speciali/New.jpg\" width=\"37\" height=\"38\"&gt;";
     
     }
     else
     {
</code></pre>
]]></description><link>https://dev.connect.gt/post/1015595</link><guid isPermaLink="true">https://dev.connect.gt/post/1015595</guid><dc:creator><![CDATA[patatrac]]></dc:creator><pubDate>Sun, 17 Jul 2011 11:49:09 GMT</pubDate></item><item><title><![CDATA[Reply to confronto date on Sun, 17 Jul 2011 10:54:47 GMT]]></title><description><![CDATA[<pre><code class="language-php">&lt;?php
                     $calcolo= date ("d-m-Y",mktime(0,0,0,date("m"),date("d")-1,date("Y")));
                     $data =(date("d-m-Y"));
                     $data_annuncio = $row_offerte['data'];
                    
                    if ($data_annuncio&lt;= $calcolo)
     {
                    
  
                    
                   echo "&lt;img src=\"../images/offerte_speciali/New.jpg\" width=\"37\" height=\"38\"&gt;";
     
     }
     else
     {
                    
  
                    
                   echo "";
     
     }
      ?&gt;
</code></pre>
<p dir="auto">mi potresti aiutare... i record me li visualizza tutti senza immagine anche se  ho messo un annuncio con data odierna</p>
]]></description><link>https://dev.connect.gt/post/1015594</link><guid isPermaLink="true">https://dev.connect.gt/post/1015594</guid><dc:creator><![CDATA[patatrac]]></dc:creator><pubDate>Sun, 17 Jul 2011 10:54:47 GMT</pubDate></item><item><title><![CDATA[Reply to confronto date on Sun, 17 Jul 2011 09:28:13 GMT]]></title><description><![CDATA[<p dir="auto">Ciao paratrac,<br />
dipende dal formato utilizzato, spesso un semplice if senza altre operazioni è sufficiente.</p>
]]></description><link>https://dev.connect.gt/post/1015528</link><guid isPermaLink="true">https://dev.connect.gt/post/1015528</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Sun, 17 Jul 2011 09:28:13 GMT</pubDate></item></channel></rss>