PHPBuilder - Human readable date in Spanish



RSS Twitter
Snippets Calendars Dates

Human readable date in Spanish

by: Juan Carlos
|
February 18, 2002

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";
}

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Juan Carlos

Comment:



Comment:

(Maximum characters: 1200). You have characters left.