Skip to content

Commit e8cf3e1

Browse files
committed
fix: whitespace fiasco
1 parent 9e40a8d commit e8cf3e1

File tree

3 files changed

+159
-69
lines changed

3 files changed

+159
-69
lines changed

_i18n/de/dates/pretty_dates.html

Lines changed: 53 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,53 @@
1-
{% assign start_date = include.start | date: "%Y-%m-%d" %}{% assign end_date = include.end | date: "%Y-%m-%d" %}{% if start_date == end_date %}
2-
{% comment %}When start and end dates are the same{% endcomment %}
3-
{% assign day = start_date | date: "%-d" %}
4-
{% assign year = start_date | date: "%Y" %}
5-
{% capture month %}{% t "times.months.{{ start_date | date: "%B" }}" %}{% endcapture %}
6-
{% capture pretty_date %}{{ day }}. {{ month }} {{ year }}{% endcapture %}
7-
{% elsif start_date | date: "%Y-%m" == end_date | date: "%Y-%m" %}
8-
{% comment %}When start and end dates are in the same month{% endcomment %}
9-
{% assign start_day = start_date | date: "%-d" %}
10-
{% assign end_day = end_date | date: "%-d" %}
11-
{% capture month %}{% t "times.months.{{ start_date | date: "%B" }}" %}{% endcapture %}
12-
{% assign year = start_date | date: "%Y" %}
13-
{% capture pretty_date %}{{ start_day }}. – {{ end_day }}. {{ month }} {{ year }}{% endcapture %}
14-
{% elsif start_date | date: "%Y" == end_date | date: "%Y" %}
15-
{% comment %}When start and end dates are in the same year{% endcomment %}
16-
{% assign start_day = start_date | date: "%-d" %}
17-
{% assign end_day = end_date | date: "%-d" %}
18-
{% capture start_month %}{% t "times.months.{{ start_date | date: "%B" }}" %}{% endcapture %}
19-
{% capture end_month %}{% t "times.months.{{ end_date | date: "%B" }}" %}{% endcapture %}
20-
{% assign year = start_date | date: "%Y" %}
21-
{% capture pretty_date %}{{ start_day }}. {{ start_month }} – {{ end_day }}. {{ end_month }} {{ year }}{% endcapture %}
22-
{% else %}
23-
{% comment %}When start and end dates are in different years{% endcomment %}
24-
{% assign start_day = start_date | date: "%-d" %}
25-
{% assign end_day = end_date | date: "%-d" %}
26-
{% capture start_month %}{% t "times.months.{{ start_date | date: "%B" }}" %}{% endcapture %}
27-
{% capture end_month %}{% t "times.months.{{ end_date | date: "%B" }}" %}{% endcapture %}
28-
{% assign start_year = start_date | date: "%Y" %}
29-
{% assign end_year = end_date | date: "%Y" %}
30-
{% capture pretty_date %}{{start_day}}. {{ start_month}} {{ start_year }} – {{ end_day }}. {{ end_month }} {{ end_year }}{% endcapture %}
31-
{% endif %}{{ pretty_date | strip }}
1+
{% assign start_date = include.start | date: "%Y-%m-%d" -%}
2+
{% assign end_date = include.end | date: "%Y-%m-%d" -%}
3+
{%- if start_date == end_date -%}
4+
{%- comment -%}When start and end dates are the same{%- endcomment -%}
5+
{% assign day = start_date | date: "%-d" -%}
6+
{% assign year = start_date | date: "%Y" -%}
7+
{%- capture month -%}
8+
{%- t "times.months.{{- start_date | date: "%B" -}}" -%}
9+
{%- endcapture -%}
10+
{%- capture pretty_date -%}
11+
{{- day -}}. {{- month -}} {{- year -}}
12+
{%- endcapture -%}
13+
{%- elsif start_date | date: "%Y-%m" == end_date | date: "%Y-%m" -%}
14+
{%- comment -%}When start and end dates are in the same month{%- endcomment -%}
15+
{% assign start_day = start_date | date: "%-d" -%}
16+
{% assign end_day = end_date | date: "%-d" -%}
17+
{%- capture month -%}
18+
{%- t "times.months.{{- start_date | date: "%B" -}}" -%}
19+
{%- endcapture -%}
20+
{% assign year = start_date | date: "%Y" -%}
21+
{%- capture pretty_date -%}
22+
{{- start_day -}}. – {{- end_day -}}. {{- month -}} {{- year -}}
23+
{%- endcapture -%}
24+
{%- elsif start_date | date: "%Y" == end_date | date: "%Y" -%}
25+
{%- comment -%}When start and end dates are in the same year{%- endcomment -%}
26+
{% assign start_day = start_date | date: "%-d" -%}
27+
{% assign end_day = end_date | date: "%-d" -%}
28+
{%- capture start_month -%}
29+
{%- t "times.months.{{- start_date | date: "%B" -}}" -%}
30+
{%- endcapture -%}
31+
{%- capture end_month -%}
32+
{%- t "times.months.{{- end_date | date: "%B" -}}" -%}
33+
{%- endcapture -%}
34+
{% assign year = start_date | date: "%Y" -%}
35+
{%- capture pretty_date -%}
36+
{{- start_day -}}. {{- start_month -}} – {{- end_day -}}. {{- end_month -}} {{- year -}}
37+
{%- endcapture -%}
38+
{%- else -%}
39+
{%- comment -%}When start and end dates are in different years{%- endcomment -%}
40+
{% assign start_day = start_date | date: "%-d" -%}
41+
{% assign end_day = end_date | date: "%-d" -%}
42+
{%- capture start_month -%}
43+
{%- t "times.months.{{- start_date | date: "%B" -}}" -%}
44+
{%- endcapture -%}
45+
{%- capture end_month -%}
46+
{%- t "times.months.{{- end_date | date: "%B" -}}" -%}
47+
{%- endcapture -%}
48+
{% assign start_year = start_date | date: "%Y" -%}
49+
{% assign end_year = end_date | date: "%Y" -%}
50+
{%- capture pretty_date -%}
51+
{{-start_day-}}. {{- start_month-}} {{- start_year -}} – {{- end_day -}}. {{- end_month -}} {{- end_year -}}
52+
{%- endcapture -%}
53+
{%- endif -%}{{- pretty_date | strip -}}

_i18n/en/dates/pretty_dates.html

Lines changed: 53 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,53 @@
1-
{% assign start_date = include.start | date: "%Y-%m-%d" %}{% assign end_date = include.end | date: "%Y-%m-%d" %}{% if
2-
start_date == end_date %} {% comment %}When start and end dates are the same{% endcomment %} {% assign day = start_date
3-
| date: "%-d" %} {% assign year = start_date | date: "%Y" %} {% capture month %}{% t "times.months.{{ start_date | date:
4-
"%B" }}" %}{% endcapture %} {% capture pretty_date %}{{ month }} {{ day }}, {{ year }}{% endcapture %} {% elsif
5-
start_date | date: "%Y-%m" == end_date | date: "%Y-%m" %} {% comment %}When start and end dates are in the same month{%
6-
endcomment %} {% assign start_day = start_date | date: "%-d" %} {% assign end_day = end_date | date: "%-d" %} {% capture
7-
month %}{% t "times.months.{{ start_date | date: "%B" }}" %}{% endcapture %} {% assign year = start_date | date: "%Y" %}
8-
{% capture pretty_date %}{{ month }} {{ start_day }} – {{ end_day }}, {{ year }}{% endcapture %} {% elsif start_date |
9-
date: "%Y" == end_date | date: "%Y" %} {% comment %}When start and end dates are in the same year{% endcomment %} {%
10-
assign start_day = start_date | date: "%-d" %} {% assign end_day = end_date | date: "%-d" %} {% capture start_month %}{%
11-
t "times.months.{{ start_date | date: "%B" }}" %}{% endcapture %} {% capture end_month %}{% t "times.months.{{ end_date
12-
| date: "%B" }}" %}{% endcapture %} {% assign year = start_date | date: "%Y" %} {% capture pretty_date %}{{ start_month
13-
}} {{ start_day }} – {{ end_month }} {{ end_day }}, {{ year }}{% endcapture %} {% else %} {% comment %}When start and
14-
end dates are in different years{% endcomment %} {% assign start_day = start_date | date: "%-d" %} {% assign end_day =
15-
end_date | date: "%-d" %} {% capture start_month %}{% t "times.months.{{ start_date | date: "%B" }}" %}{% endcapture %}
16-
{% capture end_month %}{% t "times.months.{{ end_date | date: "%B" }}" %}{% endcapture %} {% assign start_year =
17-
start_date | date: "%Y" %} {% assign end_year = end_date | date: "%Y" %} {% capture pretty_date %}{{ start_month}}
18-
{{start_day}}, {{ start_year }} – {{ end_month }} {{ end_day }}, {{ end_year }}{% endcapture %} {% endif %}{{
19-
pretty_date | strip }}
1+
{% assign start_date = include.start | date: "%Y-%m-%d" -%}
2+
{% assign end_date = include.end | date: "%Y-%m-%d" -%}
3+
{% if start_date == end_date %}
4+
{%- comment -%}When start and end dates are the same{%- endcomment -%}
5+
{% assign day = start_date | date: "%-d" %}
6+
{% assign year = start_date | date: "%Y" -%}
7+
{%- capture month -%}
8+
{% t "times.months.{{ start_date | date: "%B" }}" %}
9+
{%- endcapture -%}
10+
{%- capture pretty_date -%}
11+
{{ month }} {{ day }}, {{ year }}
12+
{%- endcapture -%}
13+
{% elsif start_date | date: "%Y-%m" == end_date | date: "%Y-%m" %}
14+
{%- comment -%}When start and end dates are in the same month{% endcomment %}
15+
{% assign start_day = start_date | date: "%-d" -%}
16+
{% assign end_day = end_date | date: "%-d" -%}
17+
{% capture month %}
18+
{%- t "times.months.{{ start_date | date: "%B" }}" -%}
19+
{%- endcapture -%}
20+
{% assign year = start_date | date: "%Y" -%}
21+
{%- capture pretty_date -%}
22+
{{ month }} {{ start_day }} – {{ end_day }}, {{ year }}
23+
{%- endcapture -%}
24+
{% elsif start_date | date: "%Y" == end_date | date: "%Y" %}
25+
{%- comment -%}When start and end dates are in the same year{%- endcomment -%}
26+
{% assign start_day = start_date | date: "%-d" %}
27+
{% assign end_day = end_date | date: "%-d" -%}
28+
{%- capture start_month -%}
29+
{% t "times.months.{{ start_date | date: "%B" }}" %}
30+
{%- endcapture -%}
31+
{%- capture end_month -%}
32+
{% t "times.months.{{ end_date | date: "%B" }}" %}
33+
{%- endcapture -%}
34+
{% assign year = start_date | date: "%Y" -%}
35+
{%- capture pretty_date -%}
36+
{{ start_month }} {{ start_day }} – {{ end_month }} {{ end_day }}, {{ year }}
37+
{%- endcapture -%}
38+
{%- else -%}
39+
{%- comment -%}When start and end dates are in different years{%- endcomment -%}
40+
{% assign start_day = start_date | date: "%-d" -%}
41+
{% assign end_day = end_date | date: "%-d" -%}
42+
{%- capture start_month -%}
43+
{%- t "times.months.{{ start_date | date: "%B" }}" -%}
44+
{%- endcapture -%}
45+
{%- capture end_month -%}
46+
{%- t "times.months.{{ end_date | date: "%B" }}" -%}
47+
{%- endcapture -%}
48+
{% assign start_year = start_date | date: "%Y" %}
49+
{% assign end_year = end_date | date: "%Y" -%}
50+
{%- capture pretty_date -%}
51+
{{ start_month}} {{start_day}}, {{ start_year }} – {{ end_month }} {{ end_day }}, {{ end_year }}
52+
{%- endcapture -%}
53+
{%- endif -%}{{pretty_date | strip }}

_i18n/es/dates/pretty_dates.html

Lines changed: 53 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,53 @@
1-
{% assign start_date = include.start | date: "%Y-%m-%d" %}{% assign end_date = include.end | date: "%Y-%m-%d" %}{% if
2-
start_date == end_date %} {% comment %}When start and end dates are the same{% endcomment %} {% assign day = start_date
3-
| date: "%-d" %} {% assign year = start_date | date: "%Y" %} {% capture month %}{% t "times.months.{{ start_date | date:
4-
"%B" }}" %}{% endcapture %} {% capture pretty_date %}{{ day }} de {{ month }} de {{ year }}{% endcapture %} {% elsif
5-
start_date | date: "%Y-%m" == end_date | date: "%Y-%m" %} {% comment %}When start and end dates are in the same month{%
6-
endcomment %} {% assign start_day = start_date | date: "%-d" %} {% assign end_day = end_date | date: "%-d" %} {% capture
7-
month %}{% t "times.months.{{ start_date | date: "%B" }}" %}{% endcapture %} {% assign year = start_date | date: "%Y" %}
8-
{% capture pretty_date %}{{ start_day }} – {{ end_day }} de {{ month }} de {{ year }}{% endcapture %} {% elsif
9-
start_date | date: "%Y" == end_date | date: "%Y" %} {% comment %}When start and end dates are in the same year{%
10-
endcomment %} {% assign start_day = start_date | date: "%-d" %} {% assign end_day = end_date | date: "%-d" %} {% capture
11-
start_month %}{% t "times.months.{{ start_date | date: "%B" }}" %}{% endcapture %} {% capture end_month %}{% t
12-
"times.months.{{ end_date | date: "%B" }}" %}{% endcapture %} {% assign year = start_date | date: "%Y" %} {% capture
13-
pretty_date %}{{ start_day }} de {{ start_month }} – {{ end_day }} de {{ end_month }} de {{ year }}{% endcapture %} {%
14-
else %} {% comment %}When start and end dates are in different years{% endcomment %} {% assign start_day = start_date |
15-
date: "%-d" %} {% assign end_day = end_date | date: "%-d" %} {% capture start_month %}{% t "times.months.{{ start_date |
16-
date: "%B" }}" %}{% endcapture %} {% capture end_month %}{% t "times.months.{{ end_date | date: "%B" }}" %}{% endcapture
17-
%} {% assign start_year = start_date | date: "%Y" %} {% assign end_year = end_date | date: "%Y" %} {% capture
18-
pretty_date %}{{start_day}} de {{ start_month}} de {{ start_year }} – {{ end_day }} de {{ end_month }} de {{ end_year
19-
}}{% endcapture %} {% endif %}{{ pretty_date | strip }}
1+
{% assign start_date = include.start | date: "%Y-%m-%d" -%}
2+
{% assign end_date = include.end | date: "%Y-%m-%d" -%}
3+
{%- if start_date == end_date -%}
4+
{%- comment -%} When start and end dates are the same {%- endcomment -%}
5+
{% assign day = start_date | date: "%-d" %}
6+
{% assign year = start_date | date: "%Y" -%}
7+
{%- capture month -%}
8+
{%- t "times.months.{{ start_date | date: "%B" }}" -%}
9+
{%- endcapture -%}
10+
{%- capture pretty_date -%}
11+
{{- day -}} de {{- month -}} de {{- year -}}
12+
{%- endcapture -%}
13+
{%- elsif start_date | date: "%Y-%m" == end_date | date: "%Y-%m" -%}
14+
{%- comment -%} When start and end dates are in the same month {% endcomment %}
15+
{% assign start_day = start_date | date: "%-d" -%}
16+
{% assign end_day = end_date | date: "%-d" -%}
17+
{%- capture month -%}
18+
{%- t "times.months.{{- start_date | date: "%B" -}}" -%}
19+
{%- endcapture -%}
20+
{% assign year = start_date | date: "%Y" -%}
21+
{%- capture pretty_date -%}
22+
{{- start_day -}} – {{- end_day -}} de {{- month -}} de {{- year -}}
23+
{%- endcapture -%}
24+
{%- elsif start_date | date: "%Y" == end_date | date: "%Y" -%}
25+
{%- comment -%} When start and end dates are in the same year {% endcomment %}
26+
{% assign start_day = start_date | date: "%-d" -%}
27+
{% assign end_day = end_date | date: "%-d" -%}
28+
{%- capture start_month -%}
29+
{%- t "times.months.{{- start_date | date: "%B" -}}" -%}
30+
{%- endcapture -%}
31+
{%- capture end_month -%}
32+
{%- t "times.months.{{- end_date | date: "%B" -}}" -%}
33+
{%- endcapture -%}
34+
{% assign year = start_date | date: "%Y" -%}
35+
{%- capture pretty_date -%}
36+
{{- start_day -}} de {{- start_month -}} – {{- end_day -}} de {{- end_month -}} de {{- year -}}
37+
{%- endcapture -%}
38+
{%- else -%}
39+
{%- comment -%} When start and end dates are in different years {%- endcomment -%}
40+
{% assign start_day = start_date | date: "%-d" %}
41+
{% assign end_day = end_date | date: "%-d" -%}
42+
{%- capture start_month -%}
43+
{%- t "times.months.{{ start_date | date: "%B" }}" -%}
44+
{%- endcapture -%}
45+
{%- capture end_month -%}
46+
{%- t "times.months.{{- end_date | date: "%B" -}}" -%}
47+
{%- endcapture -%}
48+
{% assign start_year = start_date | date: "%Y" -%}
49+
{% assign end_year = end_date | date: "%Y" -%}
50+
{%- capture pretty_date -%}
51+
{{-start_day-}} de {{- start_month-}} de {{- start_year -}} – {{- end_day -}} de {{- end_month -}} de {{ end_year }}
52+
{%- endcapture -%}
53+
{%- endif -%}{{- pretty_date | strip -}}

0 commit comments

Comments
 (0)