mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 11:38:51 +01:00
Respect system preference for 24 hour time
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
package com.moez.QKSMS.common.utils;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.test.AndroidTestCase;
|
||||
import com.moez.QKSMS.ui.settings.SettingsFragment;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
@@ -12,13 +9,6 @@ public class DateFormatterTest extends AndroidTestCase {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void test24Hours() {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
prefs.edit().putBoolean(SettingsFragment.TIMESTAMPS_24H, true).apply();
|
||||
assertTrue(DateFormatter.accountFor24HourTime(getContext(), new SimpleDateFormat("h:mm a")).equals(new SimpleDateFormat("H:mm")));
|
||||
prefs.edit().putBoolean(SettingsFragment.TIMESTAMPS_24H, false).apply();
|
||||
}
|
||||
|
||||
public void testDateSymbolsAPI(){
|
||||
assertEquals(new SimpleDateFormat("H:mm a").toPattern(), "H:mm a");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user