@Test public void testDecimalSeparatorProvisionBySystem() { DateUtils dateUtils; Date date = new Date(createrTestDate(2013, 01, 28, 10, 45, 17)); dateUtils = new DateUtils(Locale.US); Assert.assertEquals("03/28/2013 10:45", dateUtils.date2String(date)); dateUtils = new DateUtils(Locale.UK); Assert.assertEquals("28/03/2013 10:45", dateUtils.date2String(date)); dateUtils = new DateUtils(Locale.ENGLISH); Assert.assertEquals("03/28/2013 10:45", dateUtils.date2String(date)); dateUtils = new DateUtils(Locale.GERMANY); Assert.assertEquals("28.03.2013 10:45", dateUtils.date2String(date)); }
public String date2String(Date date) { DateFormat dateFormat = new SimpleDateFormat(datePattern, locale); return new StringBuilder().append(dateFormat.format(date)).toString(); }
DateUtils { public String date2String(Date date) { DateFormat dateFormat = new SimpleDateFormat(datePattern, locale); return new StringBuilder().append(dateFormat.format(date)).toString(); } }
DateUtils { public String date2String(Date date) { DateFormat dateFormat = new SimpleDateFormat(datePattern, locale); return new StringBuilder().append(dateFormat.format(date)).toString(); } DateUtils(Locale locale); }
DateUtils { public String date2String(Date date) { DateFormat dateFormat = new SimpleDateFormat(datePattern, locale); return new StringBuilder().append(dateFormat.format(date)).toString(); } DateUtils(Locale locale); String date2String(Date date); String getPattern(Locale locale); }
DateUtils { public String date2String(Date date) { DateFormat dateFormat = new SimpleDateFormat(datePattern, locale); return new StringBuilder().append(dateFormat.format(date)).toString(); } DateUtils(Locale locale); String date2String(Date date); String getPattern(Locale locale);  }