Here you can find the source of getMaxDayByMonth(String month)
public static int getMaxDayByMonth(String month)
//package com.java2s; //License from project: Apache License public class Main { public static int getMaxDayByMonth(String month) { switch (Integer.parseInt(month)) { case 1://from ww w . j a v a 2 s.c o m case 3: case 5: case 7: case 8: case 10: case 12: return 31; case 4: case 6: case 9: case 11: return 30; case 2: return 29; default: return 30; } } }