Better way to account for locale

This commit is contained in:
Lander Noterman
2015-08-20 10:16:40 +02:00
parent e83b3b2b73
commit 487e833c67
2 changed files with 6 additions and 24 deletions
@@ -22,14 +22,6 @@ public class DateFormatterTest extends AndroidTestCase {
prefs.edit().putBoolean(SettingsFragment.TIMESTAMPS_24H, false).commit();
}
public void testFlippedMonthDay(){
Locale.setDefault(Locale.UK);
Log.d("TestFlippedMonthDay", DateFormatter.accountForFlippedDayMonth(new SimpleDateFormat("MMM d, h:mm a")).toPattern());
assertTrue(DateFormatter.accountForFlippedDayMonth(new SimpleDateFormat("MMM d, h:mm a")).equals(new SimpleDateFormat("d MMM, h:mm a")));
Locale.setDefault(Locale.US);
assertTrue(DateFormatter.accountForFlippedDayMonth(new SimpleDateFormat("MMM d, h:mm a")).equals(new SimpleDateFormat("MMM d, h:mm a")));
}
public void testDateSymbolsAPI(){
assertEquals(new SimpleDateFormat("H:mm a").toPattern(), "H:mm a");
}