<?xml version="1.0" encoding="UTF-8" ?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Posteet: jacinmontava: fecha</title> 
    <link>http://www.posteet.com/</link> 
    <description>Recent posteets posted to Posteet</description>
    <ttl>60</ttl>

    
    <item>
        <title>Traduccion dias y meses</title>
        <link>http://www.posteet.com/view/868</link>
        <description>
        <![CDATA[<pre>// Obtenemos y traducimos el nombre del día
$dia=date(&quot;l&quot;);
if ($dia==&quot;Monday&quot;) $dia=&quot;Lunes&quot;;
if ($dia==&quot;Tuesday&quot;) $dia=&quot;Martes&quot;;
if ($dia==&quot;Wednesday&quot;) $dia=&quot;Miércoles&quot;;
if ($dia==&quot;Thursday&quot;) $dia=&quot;Jueves&quot;;
if ($dia==&quot;Friday&quot;) $dia=&quot;Viernes&quot;;
if ($dia==&quot;Saturday&quot;) $dia=&quot;Sabado&quot;;
if ($dia==&quot;Sunday&quot;) $dia=&quot;Domingo&quot;; 

// Obtenemos y traducimos el nombre del mes
$mes=date(&quot;F&quot;);
if ($mes==&quot;January&quot;) $mes=&quot;Enero&quot;;
if ($mes==&quot;February&quot;) $mes=&quot;Febrero&quot;;
if ($mes==&quot;March&quot;) $mes=&quot;Marzo&quot;;
if ($mes==&quot;April&quot;) $mes=&quot;Abril&quot;;
if ($mes==&quot;May&quot;) $mes=&quot;Mayo&quot;;
if ($mes==&quot;June&quot;) $mes=&quot;Junio&quot;;
if ($mes==&quot;July&quot;) $mes=&quot;Julio&quot;;
if ($mes==&quot;August&quot;) $mes=&quot;Agosto&quot;;
if ($mes==&quot;September&quot;) $mes=&quot;Setiembre&quot;;
if ($mes==&quot;October&quot;) $mes=&quot;Octubre&quot;;
if ($mes==&quot;November&quot;) $mes=&quot;Noviembre&quot;;
if ($mes==&quot;December&quot;) $mes=&quot;Diciembre&quot;;</pre> <a href="http://www.posteet.com/tags/fecha">[fecha]</a>  <a href="http://www.posteet.com/tags/php">[php]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Wed, 09 Apr 2008 06:21:32 +0000</pubDate>

            <category>fecha</category>
            <category>php</category>
    
    </item>

  
    <item>
        <title>Mostrar el proximo domingo</title>
        <link>http://www.posteet.com/view/626</link>
        <description>
        <![CDATA[<pre>/// 0=domingo 1=lunes 2=martes 3=miercoles 4=jueves 5=viernes 6=sabado

function final_semana()
{
	$unix = date(&quot;U&quot;); /// esto nos convierte la fecha de hoy en Unix
	switch (date(&quot;w&quot;)) /// segun el dia le damos un valor en segundos a $dia 
	{
     	        case 0:
         	    $dia = 0;
		    break;
     	        case 1:
         	    $dia = 518400;
		break;
     		case 2:
         	    $dia = 432000;
		    break;
     	        case 3:
         	    $dia = 345600;
		    break;
     		case 4:
         	    $dia = 259200;
		    break;
     		case 5:
         	    $dia = 172800;
		    break;
     	        case 6:
         	    $dia = 86400;
		    break;
	}//switch
        $final_semana = ($unix + $dia); ///sumamos la fecha de hoy con $dia y nos dara la fecha del domingo proximo
        $domingo_proximo = date(&quot;j-n-Y&quot;,$final_semana); ///pasamos la fecha en unix a el formato normal
	return $domingo_proximo;
}</pre> <a href="http://www.posteet.com/tags/fecha">[fecha]</a>  <a href="http://www.posteet.com/tags/php">[php]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Wed, 26 Dec 2007 14:59:19 +0000</pubDate>

            <category>fecha</category>
            <category>php</category>
    
    </item>

  
    <item>
        <title>Mostrar el lunes de la semana actual</title>
        <link>http://www.posteet.com/view/625</link>
        <description>
        <![CDATA[<pre>/// 0=domingo 1=lunes 2=martes 3=miercoles 4=jueves 5=viernes 6=sabado
function principio_semana()
{
$unix = date(&quot;U&quot;); /// esto nos convierte la fecha de hoy en Unix
switch (date(&quot;w&quot;)) /// segun el dia de la semana damos un valor en seg a $dia 
{
     			
case 0:
     $dia = 518400;
     break;
case 1:
     $dia = 0;
     break;
case 2:
     $dia = 86400;
     break;
case 3:
     $dia = 172800;
     break;
case 4:
     $dia = 259200;
     break;
case 5:
     $dia = 345600;
     break;
case 6:
     $dia = 432000;
     break;
}//switch
$inicio_semana = ($unix - $dia); ///restamos la fecha de hoy con $dia y nos dara la fecha del lunes pasado
$lunes_pasado = date(&quot;j-n-Y&quot;,$inicio_semana); ///pasamos la fecha en unix a el formato normal
return $lunes_pasado;
}//function</pre> <a href="http://www.posteet.com/tags/fecha">[fecha]</a>  <a href="http://www.posteet.com/tags/php">[php]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Wed, 26 Dec 2007 14:45:52 +0000</pubDate>

            <category>fecha</category>
            <category>php</category>
    
    </item>

  
    <item>
        <title>Cambiar el formato de la fecha</title>
        <link>http://www.posteet.com/view/621</link>
        <description>
        <![CDATA[<pre>function cambia_fecha($fecha)
{
        list( $a, $b, $c ) = split( '[/.-]', $fecha );
	$fecha_cambiada = $c.&quot;/&quot;.$b.&quot;/&quot;.$a;
	return $fecha_cambiada;
}</pre> <a href="http://www.posteet.com/tags/fecha">[fecha]</a>  <a href="http://www.posteet.com/tags/php">[php]</a> ]]>        </description>
        <dc:creator>jacinmontava</dc:creator>
        <pubDate>Wed, 26 Dec 2007 14:27:44 +0000</pubDate>

            <category>fecha</category>
            <category>php</category>
    
    </item>


</channel>
</rss>
