Skip to content

Commit d988894

Browse files
committed
Always show year in /idtracker/status/ dates
- Legacy-Id: 2018
1 parent 060307e commit d988894

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

ietf/idtracker/templatetags/ietf_filters.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,6 @@ def lstripw(string, chars):
228228
"""Strip matching leading characters from words in string"""
229229
return " ".join([word.lstrip(chars) for word in string.split()])
230230

231-
@register.filter(name='thisyear')
232-
def thisyear(date):
233-
"""Returns a boolean of whether or not the argument is this year."""
234-
if date:
235-
return date.year == datetime.date.today().year
236-
return True
237-
238231
@register.filter(name='timesince_days')
239232
def timesince_days(date):
240233
"""Returns the number of days since 'date' (relative to now)"""

ietf/templates/idtracker/document_entry.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<td nowrap>
66
{% ifequal doc.cur_state.state "In Last Call" %}
77
{% if doc.document.lc_expiration_date %}
8-
{{ doc.document.lc_expiration_date|date:"M j" }}{% if not doc.lc_expiration_date|thisyear %}, {{ doc.lc_expiration_date|date:"Y" }}{% endif %}
8+
{{ doc.document.lc_expiration_date|date:"M j" }}, {{ doc.document.lc_expiration_date|date:"Y" }}
99
{% endif %}
1010
{% else %}
1111
{% if doc.status_date %}
12-
{{ doc.status_date|date:"M j" }}{% if not doc.status_date|thisyear %}, {{ doc.status_date|date:"Y" }}{% endif %}
12+
{{ doc.status_date|date:"M j" }}, {{ doc.status_date|date:"Y" }}
1313
{% endif %}
1414
{% endifequal %}</td>
1515
{% else %}

0 commit comments

Comments
 (0)