diff options
author | Alex Ning <chineseperson5@gmail.com> | 2019-09-09 13:31:36 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2019-09-09 13:31:36 +0000 |
commit | 74888def281fdb4a62824ab74fbddd7b8569bc25 (patch) | |
tree | 27d4765fdee5501d3d45760f4e1fd823721da723 /app | |
parent | b18e44a00c4c2240295127a93ab9220075db7bc7 (diff) | |
download | infinity-for-reddit-74888def281fdb4a62824ab74fbddd7b8569bc25.tar infinity-for-reddit-74888def281fdb4a62824ab74fbddd7b8569bc25.tar.gz infinity-for-reddit-74888def281fdb4a62824ab74fbddd7b8569bc25.tar.bz2 infinity-for-reddit-74888def281fdb4a62824ab74fbddd7b8569bc25.tar.lz infinity-for-reddit-74888def281fdb4a62824ab74fbddd7b8569bc25.tar.xz infinity-for-reddit-74888def281fdb4a62824ab74fbddd7b8569bc25.tar.zst infinity-for-reddit-74888def281fdb4a62824ab74fbddd7b8569bc25.zip |
Fixed SimpleDateFormat problem which causes the app to crash on start.
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/ParseComment.java | 2 | ||||
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ParseComment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ParseComment.java index 4bcaa29a..7f48d8ea 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/ParseComment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ParseComment.java @@ -235,7 +235,7 @@ class ParseComment { Calendar submitTimeCalendar = Calendar.getInstance(); submitTimeCalendar.setTimeInMillis(submitTime); - String formattedSubmitTime = new SimpleDateFormat("MMM d, YYYY, HH:mm", + String formattedSubmitTime = new SimpleDateFormat("MMM d, yyyy, HH:mm", locale).format(submitTimeCalendar.getTime()); if(singleCommentData.has(JSONUtils.DEPTH_KEY)) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java b/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java index efe58ff0..bbfe8d56 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/ParsePost.java @@ -184,7 +184,7 @@ class ParsePost { Calendar postTimeCalendar = Calendar.getInstance(); postTimeCalendar.setTimeInMillis(postTime); - String formattedPostTime = new SimpleDateFormat("MMM d, YYYY, HH:mm", + String formattedPostTime = new SimpleDateFormat("MMM d, yyyy, HH:mm", locale).format(postTimeCalendar.getTime()); String permalink = Html.fromHtml(data.getString(JSONUtils.PERMALINK_KEY)).toString(); |