Fecha básica / Basic date


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <script type="text/javascript">
  2. var fecha=new Date()
  3. var nombredia=new Array("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado")
  4. var nombremes=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre")
  5. document.write(nombredia[fecha.getDay()] + " ")
  6. document.write(fecha.getDate() + " de ")
  7. document.write(nombremes[fecha.getMonth()] + " de ")
  8. document.write(fecha.getFullYear())
  9. </script>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.