public static int getDaysNumber(int m, int y) {
        switch(m) {
            case 2:
                return isALeapYear(y) ? 29 : 28;
            case 1:
            case 3:
            case 5:
            case 7:
            case 8:
            case 10:
            case 12:
                return 31;
            default:
                return 30;
        }
    }