Last active
August 29, 2015 14:07
-
-
Save oriolrivera/3915edb56cf2a71aaed6 to your computer and use it in GitHub Desktop.
Fecha y Hora en Javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fecha = new Date(); | |
alert("Día: "+fecha.getDate()+"\nMes: "+(fecha.getMonth()+1)+"\nAño: "+fecha.getFullYear()); | |
alert("Hora: "+fecha.getHours()+"\nMinuto: "+fecha.getMinutes()+"\nSegundo: "+fecha.getSeconds()+"\nMilisegundo: "+fecha.getMilliseconds()); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment