Android months of Year [closed]
How can i get all days of particular month and particular year..
Calendar cal = Calendar.getInstance();
cal.set(Calendar.MONTH,someMonth);//month starts from 0
cal.set(Calendar.YEAR,someYear);
int noOfDayInMonthyear = cal.getActualMaximum(Calendar.DAY_OF_MONTH); //either 28,29,30,31
and iterate from 1 to noOfDayInMonthyear
- Documentation
精彩评论