private static int leapDays(Tm tm) {
        if (tm.getMonth() < 3) {
            return 0;
        }
        int year = tm.getYear();
        return year % 4 == 0 && (year % 400 == 0 || year % 100 != 0) ? 1 : 0;
    }