]> git.ktnx.net Git - mobile-ledger.git/commitdiff
fix ledger date format to remain sortable
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 12 Jan 2019 12:58:50 +0000 (12:58 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 12 Jan 2019 12:58:50 +0000 (12:58 +0000)
app/src/main/java/net/ktnx/mobileledger/utils/Globals.java

index 30dec945a994b076385157d3ad22c8d3efc6a28d..e20e75b9df126b5d23674cc5eb8125d69e03678e 100644 (file)
@@ -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);