/**
* 根据Y传过来的year month,y can catch this month all day
* @param year
* @param month
* @return
*/
public static String [] getAll_Year_Month(int year,int month)
{
SimpleDateFormat sim = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
c.set(Calendar.YEAR, year);
c.set(Calendar.MONTH,month-1); //注意这一块
int len =c.getActualMaximum(Calendar.DATE);
String[] st = new String[len];
for(int i=0; i<st.length; i++)
{
c.set(Calendar.DATE,i+1);
st[i]=sim.format(c.getTime());
}
return st;
}
* 根据Y传过来的year month,y can catch this month all day
* @param year
* @param month
* @return
*/
public static String [] getAll_Year_Month(int year,int month)
{
SimpleDateFormat sim = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
c.set(Calendar.YEAR, year);
c.set(Calendar.MONTH,month-1); //注意这一块
int len =c.getActualMaximum(Calendar.DATE);
String[] st = new String[len];
for(int i=0; i<st.length; i++)
{
c.set(Calendar.DATE,i+1);
st[i]=sim.format(c.getTime());
}
return st;
}