Skip to content

Instantly share code, notes, and snippets.

@donchenko
Created October 7, 2016 05:55
Show Gist options
  • Save donchenko/7f652fd08f60df13423e879292341c65 to your computer and use it in GitHub Desktop.
Save donchenko/7f652fd08f60df13423e879292341c65 to your computer and use it in GitHub Desktop.
Функция JS которая считает количество дней по номеру месяца.
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