but that's trival, isn't that already solved?
function f(x) { return 28 + maybeLeap(x) + (...); }
I remember it's something related with "(x % 4) == 0" and "not ends_with(00)"