From: Damyan Ivanov Date: Sat, 12 Jan 2019 12:58:50 +0000 (+0000) Subject: fix ledger date format to remain sortable X-Git-Tag: v0.3~51 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=4917463f434105756e9cc984eedee64a8f276b2a;p=mobile-ledger.git fix ledger date format to remain sortable --- 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);