Here you can find the source of getLeapYear(int theyear)
private static int getLeapYear(int theyear)
//package com.java2s; //License from project: Open Source License public class Main { private static int getLeapYear(int theyear) { return ((theyear % 4 == 0 && theyear % 100 != 0) || theyear % 400 == 0) ? 29 : 28; }//from w w w . j a v a 2 s .c o m }