Created
November 27, 2016 13:19
-
-
Save zhaoyou/142d08d236495367ed9fae5eeb773747 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
/** | |
* from Weibo http://weibo.com/haoel?from=feed&loc=at&nick=%E5%B7%A6%E8%80%B3%E6%9C%B5%E8%80%97%E5%AD%90&is_all=1#1480252617643 | |
**/ | |
days = (month === 2) ? (28 + isLeapYear) : 31 - (month - 1) % 7 % 2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment