mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
extract pattern to a constant
This commit is contained in:
parent
62126daff2
commit
16d81b4fa6
1 changed files with 3 additions and 2 deletions
|
@ -64,6 +64,7 @@ public class FileStorageUtils {
|
|||
public static final Integer SORT_NAME = 0;
|
||||
public static final Integer SORT_DATE = 1;
|
||||
public static final Integer SORT_SIZE = 2;
|
||||
public static final String PATTERN_YYYY_MM = "yyyy/MM/";
|
||||
public static Integer mSortOrder = SORT_NAME;
|
||||
public static Boolean mSortAscending = true;
|
||||
|
||||
|
@ -133,7 +134,7 @@ public class FileStorageUtils {
|
|||
|
||||
Date d = new Date(date);
|
||||
|
||||
DateFormat df = new SimpleDateFormat("yyyy/MM/", currentLocale);
|
||||
DateFormat df = new SimpleDateFormat(PATTERN_YYYY_MM, currentLocale);
|
||||
df.setTimeZone(TimeZone.getTimeZone(TimeZone.getDefault().getID()));
|
||||
|
||||
return df.format(d);
|
||||
|
@ -148,7 +149,7 @@ public class FileStorageUtils {
|
|||
|
||||
Date d = new Date(date);
|
||||
|
||||
DateFormat df = new SimpleDateFormat("yyyy/MM/");
|
||||
DateFormat df = new SimpleDateFormat(PATTERN_YYYY_MM);
|
||||
|
||||
return df.format(d);
|
||||
|
||||
|
|
Loading…
Reference in a new issue