FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge pull request #19811 from guardian/pm-fix-ageing · devhttps/frontend@bf38813 · GitHub

Commit bf38813

Browse files
authored
Merge pull request guardian#19811 from guardian/pm-fix-ageing
When calculating how old an article is, months should be 30 days long
2 parents 8830d5b + 97917b1 commit bf38813

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎common/app/views/support/ContentOldAgeDescriber.scala‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class ContentOldAgeDescriber {
3434
if (pubDate.isBefore(DateTime.now().minusDays(warnLimitDays))) {
3535
val ageMillis = DateTime.now().getMillis - pubDate.getMillis
3636
val years = TimeUnit.MILLISECONDS.toDays(ageMillis) / 365
37-
val months = TimeUnit.MILLISECONDS.toDays(ageMillis) / 28
37+
val months = TimeUnit.MILLISECONDS.toDays(ageMillis) / 31
3838
val weeks = TimeUnit.MILLISECONDS.toDays(ageMillis) / 7
3939
val days = TimeUnit.MILLISECONDS.toDays(ageMillis)
4040

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL