Skip to content

Commit

Permalink
closes #14 standardize datetime display
Browse files Browse the repository at this point in the history
(at least for en locale)
  • Loading branch information
darianmiller committed May 5, 2023
1 parent 446f3a2 commit a02bca1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions _data/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ post:
# See: <http://strftime.net/>, <https://day.js.org/docs/en/display/format>
df:
post:
strftime: '%b %e, %Y'
dayjs: 'll'
strftime: '%b %d, %Y'
dayjs: 'MMM DD, YYYY'
archives:
strftime: '%b'
dayjs: 'MMM'
Expand Down
2 changes: 1 addition & 1 deletion _includes/datetime.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{% assign wrap_elem = include.wrap | default: 'em' %}
{% assign df_strftime = site.data.locales[include.lang].df.post.strftime | default: '%d/%m/%Y' %}
{% assign df_dayjs = site.data.locales[include.lang].df.post.dayjs | default: 'DD/MM/YYYY' %}
{% assign df_dayjs = site.data.locales[include.lang].df.post.dayjs | default: 'MMM DD YYYY' %} <!-- used on home page -->

<{{ wrap_elem }}
class="{% if include.class %}{{ include.class }}{% endif %}"
Expand Down

0 comments on commit a02bca1

Please sign in to comment.