Skip to content

Commit

Permalink
Merge pull request #1562 from ubyssey/month-toggle-redo-merges
Browse files Browse the repository at this point in the history
Month toggle!!!
  • Loading branch information
SamuelmdLow authored Nov 14, 2024
2 parents a25b8a2 + 3084a76 commit f22d467
Show file tree
Hide file tree
Showing 3 changed files with 657 additions and 111 deletions.
2 changes: 2 additions & 0 deletions article/templatetags/articletags.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ def display_pubdate(value):
pubdate = value.astimezone(timezone.get_current_timezone())
today = timezone.now().astimezone(timezone.get_current_timezone())
delta = today - pubdate
print(today.date())
print(pubdate.date())

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

0 comments on commit f22d467

Please sign in to comment.