Created
July 21, 2012 13:14
-
-
Save kaizimmer/3155797 to your computer and use it in GitHub Desktop.
Ecmascript | Calculate number of days in a month
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
function getNumberOfDays ( year, month ) | |
{ | |
return 32 - new Date(year, month, 32).getDate(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment