Version: 1

Type: Function

Category: Calendars/Dates

License: GNU General Public License

Description: This simple function will return the actual date in a human readable way in Spanish.



/**
* This function will return the actual date in a human readable way (Spanish).
* @author Juan Carlos Gonzalez <00664714@academ01.gda.itesm.mx>
*/
function fecha_actual(){
    $mes = array(1=>"enero",2=>"febrero",3=>"marzo",4=>"abril",5=>"mayo",6=>"junio",7=>"julio",
                 8=>"agosto",9=>"septiembre",10=>"octubre",11=>"noviembre",12=>"diciembre");
    $dia = array("domingo", "lunes","martes","mircoles","jueves","viernes","sbado");
    $diames = date("j");
    $nmes = date("n");
    $ndia = date("w");
    $nano = date("Y");
    
    return $dia[$ndia].", $diames de ".$mes[$nmes].", $nano";
}