Skip to content

Commit

Permalink
Merge pull request #1285 from ubyssey/fix-year-display-samlow
Browse files Browse the repository at this point in the history
Displayed full year instead of last two digits
  • Loading branch information
SamuelmdLow authored Sep 14, 2023
2 parents 9a1a953 + 740de5f commit 0c159f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion article/templatetags/articletags.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def display_pubdate(value):
delta = today - pubdate

if delta.total_seconds() > datetime.timedelta(days=365).total_seconds():
return pubdate.strftime("%B xx%d %y").replace("xx0","").replace("xx","")
return pubdate.strftime("%B xx%d, %Y").replace("xx0","").replace("xx","")
elif delta.total_seconds() > datetime.timedelta(days=1).total_seconds():
return pubdate.strftime("%B xx%d").replace("xx0","").replace("xx","")
elif delta.total_seconds() > datetime.timedelta(hours=5).total_seconds():
Expand Down

0 comments on commit 0c159f0

Please sign in to comment.