Merge pull request #43 from netz39/german-date-format

Change date format to german with german month names
This commit is contained in:
timo 2023-10-25 14:22:02 +02:00 committed by GitHub
commit 4667456e63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -14,7 +14,7 @@ str_javascript_required_disqus: "Please enable JavaScript to view comments."
str_no_result_found: "No result found" str_no_result_found: "No result found"
str_cookie_approve: "Approve" str_cookie_approve: "Approve"
str_cookie_disclaimer: "We would like to use third party cookies and scripts to improve the functionality of this website." str_cookie_disclaimer: "We would like to use third party cookies and scripts to improve the functionality of this website."
str_months: [January, February, March, April, May, June, July, August, September, October, November, December] str_months: [Januar, Februar, März, April, Mai, Juni, Juli, August, September, Oktober, November, Dezember]
# Localization settings # Localization settings
cusdis_lang: # zh-cn, es, tr, pt-BR cusdis_lang: # zh-cn, es, tr, pt-BR

View file

@ -1,5 +1,5 @@
{% assign author = site.data.authors[include.author] %} {% assign author = site.data.authors[include.author] %}
{% assign date = include.date | default: "today" | date: "%B %-d, %Y" %} {% assign date = include.date | default: "today" | date: "%-d. %B %Y" %}
<div class="post-info"> <div class="post-info">
{%- if author.url -%}<a href="{{ author.url | relative_url }}" target="_blank" rel="noopener">{%- endif -%} {%- if author.url -%}<a href="{{ author.url | relative_url }}" target="_blank" rel="noopener">{%- endif -%}
@ -9,7 +9,7 @@
<p class="meta"> <p class="meta">
{% if author.name %}{{ author.name }} - {% endif %} {% if author.name %}{{ author.name }} - {% endif %}
{% assign x = date | date: "%m" | minus: 1 %} {% assign x = date | date: "%m" | minus: 1 %}
{{ site.data.language.str_months[x] | default: date | date: "%B" }} {{ date | date: "%d, %Y" }} {{ date | date: "%-d. " }}{{ site.data.language.str_months[x]}} {{ date | date: "%Y" }}
</p> </p>
{%- if author.url -%}</a>{%- endif -%} {%- if author.url -%}</a>{%- endif -%}
</div> </div>