Skip to content

Instantly share code, notes, and snippets.

@oriolrivera
Created October 17, 2013 17:05
Show Gist options
  • Save oriolrivera/7028571 to your computer and use it in GitHub Desktop.
Save oriolrivera/7028571 to your computer and use it in GitHub Desktop.
Fecha actual con javascript
var dias_semana = new Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado");
var meses = new Array ("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre", "Diciembre");
var fecha_actual = new Date();
alert("Hoy es " + dias_semana[fecha_actual.getDay()] + " dia " + fecha_actual.getDate() + " de " + meses[fecha_actual.getMonth()] + " de " + fecha_actual.getFullYear());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment