Created
April 19, 2018 22:27
-
-
Save parzibyte/933c0e8937d5675b96b23469941b5171 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
function diasEnUnMes(mes, año) { | |
mes = mes.toUpperCase(); | |
var meses = ["ENERO", "FEBRERO", "MARZO", "ABRIL", "MAYO", "JUNIO", "JULIO", "AGOSTO", "SEPTIEMBRE", "OCTUBRE", "NOVIEMBRE", "DICIEMBRE"]; | |
return new Date(año, meses.indexOf(mes) + 1, 0).getDate(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment