Last active
March 10, 2021 13:37
-
-
Save parzibyte/675edf8bb0b033ab036fc4f93defe7b6 to your computer and use it in GitHub Desktop.
This file contains 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
const fechaComoCadena = "2020-03-09 23:37:22"; // día lunes | |
const dias = [ | |
'domingo', | |
'lunes', | |
'martes', | |
'miércoles', | |
'jueves', | |
'viernes', | |
'sábado', | |
]; | |
const numeroDia = new Date(fechaComoCadena).getDay(); | |
const nombreDia = dias[numeroDia]; | |
console.log("Nombre de día de la semana: ", nombreDia); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment