Created
October 9, 2016 09:22
-
-
Save romanitalian/1dfa7ad8e94415d0f168f71f43b71266 to your computer and use it in GitHub Desktop.
Как одной математической формулой по номеру месяца посчитать количество дней в нем?
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 f(x) { return 28 + (x + Math.floor(x/8)) % 2 + 2 % x + 2 * Math.floor(1/x); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment