Select the following Topics you are interested
This "Javascript examplet" is extracted from article "How to write a spanish Date function?" from Cloudgen's Javascript Laboratory
to write a date in spanish
The following is the source code of the snippet. Click the link for downloading the snippet.
<script type="text/javascript">
function spanishDate(d){
var weekday=["Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado"];
var monthname=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"];
return weekday[d.getDay()]+" "+d.getDate()+" de "+monthname[d.getMonth()]+" de "+d.getFullYear()
}
</script>
The following is the application code of the snippet.
<script type="text/javascript"> var d = new Date() document.write(spanishDate(d)); </script>