js: leap: encapusale all those comparisons in a Year object