public static String convertMonth ( int month , boolean useShort ) { String monthStr ; switch ( month ) { default : monthStr = "January" ; break ; case Calendar . FEBRUARY : monthStr = "February" ; break ; case Calendar . MARCH : monthStr = "March" ; break ; case Calendar . APRIL : monthStr = "April" ; break ; case Calendar . MAY : monthStr = "May" ; break ; case Calendar . JUNE : monthStr = "June" ; break ; case Calendar . JULY : monthStr = "July" ; break ; case Calendar . AUGUST : monthStr = "August" ; break ; case Calendar . SEPTEMBER : monthStr = "September" ; break ; case Calendar . OCTOBER : monthStr = "October" ; break ; case Calendar . NOVEMBER : monthStr = "November" ; break ; case Calendar . DECEMBER : monthStr = "December" ; break ; } if ( useShort ) monthStr = monthStr . substring ( 0 , 3 ) ; return monthStr ; }
Converts a month by number to full text