diff options
author | Andrew Dolgov <[email protected]> | 2018-07-05 13:46:37 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-07-05 13:46:37 +0300 |
commit | d6cdcac58670c54e5f7b0a25a9b2692344dcb250 (patch) | |
tree | 7d42422908e5c2d2842916c84454e88605e783d2 /org.fox.ttrss/src/main/java | |
parent | f0d42be25783dfea726bbfe4ab50fcbaec75923e (diff) | |
parent | ff4463c514fd06f393ca0d726a6ceb24e84c9292 (diff) |
Merge branch 'master' of git.tt-rss.org:fox/tt-rss-android
Diffstat (limited to 'org.fox.ttrss/src/main/java')
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java index e75769b3..c7d65742 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java @@ -331,7 +331,12 @@ public class ArticleFragment extends StateSavedFragment { dv.setTextSize(TypedValue.COMPLEX_UNIT_SP, m_articleSmallFontSize); Date d = new Date(m_article.updated * 1000L); - DateFormat df = new SimpleDateFormat("MMM dd, HH:mm"); + long half_a_year_ago = System.currentTimeMillis()/1000L - 182*24*60*60; + DateFormat df; + if (m_article.updated < half_a_year_ago) + df = new SimpleDateFormat("MMM dd, yyyy"); + else + df = new SimpleDateFormat("MMM dd, HH:mm"); dv.setText(df.format(d)); } |