<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>
<?php
 

 echo "El dia es el ".pastDate("2008-08-02").' 02'."      $time";


function pastDate($fecha){//Y-m-d Ej.- 2004-08-01
	$fec=split("-",$fecha);
	$time=mktime(0,0,0,$fec[1],$fec[2],$fec[0]);
   $dia_mes=date("D",$time);
   $arrdias=array(
   "Mon"=>"LUNES",
   "Tue"=>"MARTES",
   "Wed"=>"MIERCOLES",
   "Thu"=>"JUEVES",
   "Fri"=>"VIERNES",
   "Sat"=>"SABADO",
   "Sun"=>"DOMINGO",
   ); 
   
   return $arrdias[$dia_mes];
}
		
?>
<body>
</body>
</html>
