Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Last active March 10, 2021 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/675edf8bb0b033ab036fc4f93defe7b6 to your computer and use it in GitHub Desktop.
Save parzibyte/675edf8bb0b033ab036fc4f93defe7b6 to your computer and use it in GitHub Desktop.
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