Skip to content

Commit

Permalink
Fixes #877 - Updates date format
Browse files Browse the repository at this point in the history
  • Loading branch information
anselmbradford committed Aug 11, 2017
1 parent e3e3238 commit e76b80e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
5 changes: 3 additions & 2 deletions cfgov/jinja2/v1/_includes/macros/time.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
{% macro render(datetime,
show_value_for={'date':true, 'time':true, 'timezone':true}) %}
<span class="datetime">
{% if show_value_for.date == true %}
{% if show_value_for.date == true %}
<time class="datetime_date" datetime="{{ dt.format_datetime(datetime) }}">
{{ dt.format_date(datetime) }}
{# Displays the date in the format: MMM. DD, YYYY #}
{{'{dt:%b}. {dt.day}, {dt.year}'.format(dt = datetime)}}
</time>
{% endif %}

Expand Down
4 changes: 3 additions & 1 deletion cfgov/jinja2/v1/_includes/organisms/post-preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@
data-month="{{ event.start_dt | date('%b') }}"
data-day="{{ event.start_dt | date('%-d') }}"
datetime="{{ event.start_dt | date('%c') }}">
<span class="u-visually-hidden">{{ event.start_dt| date('%b %-d, %Y') }}</span>
<span class="u-visually-hidden">
{{'{dt:%b}. {dt.day}, {dt.year}'.format(dt = event.start_dt)}}
</span>
</time>
{% if event.live_stream_link %}
<img class="o-post-preview_image"
Expand Down
6 changes: 4 additions & 2 deletions cfgov/jinja2/v1/ask-cfpb/answer-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
block__flush-top
block__sub">
{% if last_edited %}
<time datetime='{{ last_edited }}' pubdate class="answer-edited-date">updated {{ dt.format_date(last_edited) }}</time>
<time datetime='{{ last_edited }}' pubdate class="answer-edited-date">
{# Displays the date in the format: MMM. DD, YYYY #}
updated {{'{dt:%b}. {dt.day}, {dt.year}'.format(dt = last_edited)}}
</time>
{% endif %}

<h2>{{ page.question | striptags }}</h2>
Expand Down Expand Up @@ -97,7 +100,6 @@ <h3 class="answer-snippet">
</div>
{{ ask_search_bar.render( 'left' ) }}


{% endblock %}

{% block content_sidebar_modifiers -%}
Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/css/calendar-icon.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- name: Calendar Icon
markup: |
<time class="calendar-icon" data-month="Jan" data-day="21" datetime="2015-01-21">
<span class="u-visually-hidden">Jan 21, 2015</span>
<span class="u-visually-hidden">Jan. 21, 2015</span>
</time>
denotes:
- |
Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/css/organisms/item-introduction.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<p class="short-desc">…</p>
<p class="short-desc">
By <a href="#">AuthorA</a> -
<span><time>DEC 24, 2015</time></span>
<span><time>DEC. 24, 2015</time></span>
</p>
<div>
[social media molecule]
Expand Down
2 changes: 1 addition & 1 deletion cfgov/unprocessed/css/organisms/post-preview.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Published
<span class="datetime">
<time class="datetime_date" datetime="2003-08-05T21:36:11.000000-0400">
AUG 05, 2003
AUG. 5, 2003
</time>
</span>
</span>
Expand Down

0 comments on commit e76b80e

Please sign in to comment.