4 ms·
how about this? leap = function(x) { if ((x % 4) != 0) { return 0; } return Number( (x % 100) !=
by _lce0 12y ago
how about this?
leap = function(x) {
if ((x % 4) != 0) {
return 0;
}
return Number(
(x % 100) != 0 || (x % 400) == 0
);
}
function(x) { return 28 + leap(x) + (...) };