Here you can find the source of getCurMonthDayNumber(String strYear, String strMonth)
public static int getCurMonthDayNumber(String strYear, String strMonth) throws NumberFormatException
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Locale; public class Main { public static int getCurMonthDayNumber(String strYear, String strMonth) throws NumberFormatException { int ret = -1; if ((Integer.parseInt(strMonth) > 0) && (Integer.parseInt(strMonth) <= 12)) { Calendar cal = Calendar.getInstance(Locale.CHINA); cal.clear();/*from ww w.j a v a 2 s . c o m*/ cal.set(new Integer(strYear).intValue(), new Integer(strMonth).intValue() - 1, 1); ret = cal.getActualMaximum(5); } return ret; } }