Created
March 3, 2016 01:15
-
-
Save MinweiShen/6b1e5b49ff1f5a075648 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
return month === 1 ? | |
((year % 4 ===0 && year%100!==0) or year %400===0) ? 28 : 29) : /* February */ | |
((month % 2) ^ (month < 7) ? 31 : 30); /* Other months */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment