private String [ ] getDays ( int year , int month ) { Calendar cal = Calendar . getInstance ( ) ; cal . set ( year , month , 1 ) ; int dayNum = cal . getActualMaximum ( Calendar . DAY_OF_MONTH ) ; String [ ] days = new String [ dayNum ] ; for ( int i = 0 ; i < dayNum ; i ++ ) { days [ i ] = String . valueOf ( i + 1 ) ; } return days ; }
Get days of a month