diff options
author | fox <[email protected]> | 2018-05-11 05:01:09 +0000 |
---|---|---|
committer | Gogs <[email protected]> | 2018-05-11 05:01:09 +0000 |
commit | ff4463c514fd06f393ca0d726a6ceb24e84c9292 (patch) | |
tree | 61157ea24f5094c3a5db36ae2e7b6952f1dc5527 /org.fox.ttrss | |
parent | 5dfda2da1a05961b221a2f8d48f0bdcfb8354465 (diff) | |
parent | 0ea83c048723e11bb3dfc55a854925390a91e9f1 (diff) |
Merge branch 'master' of ge0rg/tt-rss-android into master
Diffstat (limited to 'org.fox.ttrss')
-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)); } |