From 4917463f434105756e9cc984eedee64a8f276b2a Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sat, 12 Jan 2019 12:58:50 +0000 Subject: [PATCH] fix ledger date format to remain sortable --- app/src/main/java/net/ktnx/mobileledger/utils/Globals.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/utils/Globals.java b/app/src/main/java/net/ktnx/mobileledger/utils/Globals.java index 30dec945..e20e75b9 100644 --- a/app/src/main/java/net/ktnx/mobileledger/utils/Globals.java +++ b/app/src/main/java/net/ktnx/mobileledger/utils/Globals.java @@ -36,6 +36,8 @@ public final class Globals { @ColorInt public static int primaryDark, defaultTextColor; public static String[] monthNames; + private static SimpleDateFormat ledgerDateFormatter = + new SimpleDateFormat("yyyy/MM/dd", Locale.US); public static void hideSoftKeyboard(Activity act) { // hide the keyboard View v = act.getCurrentFocus(); @@ -45,7 +47,6 @@ public final class Globals { imm.hideSoftInputFromWindow(v.getWindowToken(), 0); } } - private static SimpleDateFormat ledgerDateFormatter = new SimpleDateFormat("y/M/d", Locale.US); public static Date parseLedgerDate(String dateString) { try { return ledgerDateFormatter.parse(dateString); -- 2.39.5