@Test public void testGetMonthName() { assertThat("testGetMonthName 0", DCDate.getMonthName(-1, new Locale("en")), equalTo("Unspecified")); assertThat("testGetMonthName 1", DCDate.getMonthName(0, new Locale("en")), equalTo("Unspecified")); assertThat("testGetMonthName 2", DCDate.getMonthName(13, new Locale("en")), equalTo("Unspecified")); assertThat("testGetMonthName 3", DCDate.getMonthName(14, new Locale("en")), equalTo("Unspecified")); assertThat("testGetMonthName 4", DCDate.getMonthName(1, new Locale("en")), equalTo("January")); assertThat("testGetMonthName 5", DCDate.getMonthName(2, new Locale("en")), equalTo("February")); assertThat("testGetMonthName 6", DCDate.getMonthName(3, new Locale("en")), equalTo("March")); assertThat("testGetMonthName 7", DCDate.getMonthName(4, new Locale("en")), equalTo("April")); assertThat("testGetMonthName 8", DCDate.getMonthName(5, new Locale("en")), equalTo("May")); assertThat("testGetMonthName 9", DCDate.getMonthName(6, new Locale("en")), equalTo("June")); assertThat("testGetMonthName 10", DCDate.getMonthName(7, new Locale("en")), equalTo("July")); assertThat("testGetMonthName 11", DCDate.getMonthName(8, new Locale("en")), equalTo("August")); assertThat("testGetMonthName 12", DCDate.getMonthName(9, new Locale("en")), equalTo("September")); assertThat("testGetMonthName 13", DCDate.getMonthName(10, new Locale("en")), equalTo("October")); assertThat("testGetMonthName 14", DCDate.getMonthName(11, new Locale("en")), equalTo("November")); assertThat("testGetMonthName 15", DCDate.getMonthName(12, new Locale("en")), equalTo("December")); assertThat("testGetMonthName 16", DCDate.getMonthName(1, new Locale("es")), equalTo("enero")); assertThat("testGetMonthName 17", DCDate.getMonthName(2, new Locale("es")), equalTo("febrero")); assertThat("testGetMonthName 18", DCDate.getMonthName(3, new Locale("es")), equalTo("marzo")); assertThat("testGetMonthName 19", DCDate.getMonthName(4, new Locale("es")), equalTo("abril")); assertThat("testGetMonthName 20", DCDate.getMonthName(5, new Locale("es")), equalTo("mayo")); assertThat("testGetMonthName 21", DCDate.getMonthName(6, new Locale("es")), equalTo("junio")); assertThat("testGetMonthName 22", DCDate.getMonthName(7, new Locale("es")), equalTo("julio")); assertThat("testGetMonthName 23", DCDate.getMonthName(8, new Locale("es")), equalTo("agosto")); assertThat("testGetMonthName 24", DCDate.getMonthName(9, new Locale("es")), equalTo("septiembre")); assertThat("testGetMonthName 25", DCDate.getMonthName(10, new Locale("es")), equalTo("octubre")); assertThat("testGetMonthName 26", DCDate.getMonthName(11, new Locale("es")), equalTo("noviembre")); assertThat("testGetMonthName 27", DCDate.getMonthName(12, new Locale("es")), equalTo("diciembre")); }
public static String getMonthName(int m, Locale locale) { if ((m > 0) && (m < 13)) { DateFormatSymbols dfs = dfsLocaleMap.get(locale); if (dfs == null) { dfs = new DateFormatSymbols(locale); dfsLocaleMap.put(locale, dfs); } return dfs.getMonths()[m-1]; } else { return "Unspecified"; } }
DCDate { public static String getMonthName(int m, Locale locale) { if ((m > 0) && (m < 13)) { DateFormatSymbols dfs = dfsLocaleMap.get(locale); if (dfs == null) { dfs = new DateFormatSymbols(locale); dfsLocaleMap.put(locale, dfs); } return dfs.getMonths()[m-1]; } else { return "Unspecified"; } } }
DCDate { public static String getMonthName(int m, Locale locale) { if ((m > 0) && (m < 13)) { DateFormatSymbols dfs = dfsLocaleMap.get(locale); if (dfs == null) { dfs = new DateFormatSymbols(locale); dfsLocaleMap.put(locale, dfs); } return dfs.getMonths()[m-1]; } else { return "Unspecified"; } } DCDate(Date date);  DCDate(int yyyy, int mm, int dd, int hh, int mn, int ss);  DCDate(String fromDC); }
DCDate { public static String getMonthName(int m, Locale locale) { if ((m > 0) && (m < 13)) { DateFormatSymbols dfs = dfsLocaleMap.get(locale); if (dfs == null) { dfs = new DateFormatSymbols(locale); dfsLocaleMap.put(locale, dfs); } return dfs.getMonths()[m-1]; } else { return "Unspecified"; } } DCDate(Date date);  DCDate(int yyyy, int mm, int dd, int hh, int mn, int ss);  DCDate(String fromDC); int getYear(); int getMonth(); int getDay(); int getHour(); int getMinute(); int getSecond(); int getYearUTC(); int getMonthUTC(); int getDayUTC(); int getHourUTC(); int getMinuteUTC(); int getSecondUTC(); String toString(); Date toDate(); String displayDate(boolean showTime, boolean isLocalTime, Locale locale); String displayLocalDate(boolean showTime, Locale locale); String displayUTCDate(boolean showTime, Locale locale); static DCDate getCurrent(); static String getMonthName(int m, Locale locale); }
DCDate { public static String getMonthName(int m, Locale locale) { if ((m > 0) && (m < 13)) { DateFormatSymbols dfs = dfsLocaleMap.get(locale); if (dfs == null) { dfs = new DateFormatSymbols(locale); dfsLocaleMap.put(locale, dfs); } return dfs.getMonths()[m-1]; } else { return "Unspecified"; } } DCDate(Date date);  DCDate(int yyyy, int mm, int dd, int hh, int mn, int ss);  DCDate(String fromDC); int getYear(); int getMonth(); int getDay(); int getHour(); int getMinute(); int getSecond(); int getYearUTC(); int getMonthUTC(); int getDayUTC(); int getHourUTC(); int getMinuteUTC(); int getSecondUTC(); String toString(); Date toDate(); String displayDate(boolean showTime, boolean isLocalTime, Locale locale); String displayLocalDate(boolean showTime, Locale locale); String displayUTCDate(boolean showTime, Locale locale); static DCDate getCurrent(); static String getMonthName(int m, Locale locale);  }