diff options
| author | patrick <patrick@helmsdeep.at> | 2013-01-04 00:40:23 +0100 |
|---|---|---|
| committer | patrick <patrick@helmsdeep.at> | 2013-01-04 00:40:23 +0100 |
| commit | aea6cad80a52c8c117fbf78df78138e6c019fbc6 (patch) | |
| tree | 96e2cd66fc06425f3cd302d71c5dd81175cb6f7a | |
| parent | 8276358559e9447eb3533275ee6b263b19cc4b55 (diff) | |
| download | cgeo-aea6cad80a52c8c117fbf78df78138e6c019fbc6.zip cgeo-aea6cad80a52c8c117fbf78df78138e6c019fbc6.tar.gz cgeo-aea6cad80a52c8c117fbf78df78138e6c019fbc6.tar.bz2 | |
Format date according to system-wide settings
The date is not formatted according to the current locale and the
user's date-order preference, that takes precedence.
| -rw-r--r-- | main/src/cgeo/geocaching/ui/Formatter.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/ui/Formatter.java b/main/src/cgeo/geocaching/ui/Formatter.java index ea2ecb5..60fb3e6 100644 --- a/main/src/cgeo/geocaching/ui/Formatter.java +++ b/main/src/cgeo/geocaching/ui/Formatter.java @@ -13,6 +13,7 @@ import org.apache.commons.lang3.StringUtils; import android.content.Context; import android.text.format.DateUtils; +import java.text.DateFormat; import java.util.ArrayList; import java.util.List; @@ -70,8 +71,8 @@ public abstract class Formatter { * @return the formatted string */ public static String formatShortDate(long date) { - return DateUtils.formatDateTime(context, date, DateUtils.FORMAT_SHOW_DATE - | DateUtils.FORMAT_NUMERIC_DATE); + DateFormat dateFormat = android.text.format.DateFormat.getDateFormat(context); + return dateFormat.format(date); } /** |
