List of usage examples for java.text DateFormatSymbols getInstance
public static final DateFormatSymbols getInstance(Locale locale)
DateFormatSymbols
instance for the specified locale. From source file:com.erudika.para.utils.Utils.java
/** * Returns an array of the months in the Gregorian calendar. * @param locale the locale used for the months' names * @return an array of the 12 months//from w w w. j a v a 2s. c om */ public static String[] getMonths(Locale locale) { if (locale == null) { locale = Locale.US; } DateFormatSymbols dfs = DateFormatSymbols.getInstance(locale); return dfs.getMonths(); }