Skip to content
This repository was archived by the owner on Jul 21, 2019. It is now read-only.

Commit 83b7166

Browse files
authored
Merge pull request #664 from devopsdays/fix-dates-welcome-page
Fix for #663 (dates displayed incorrectly)
2 parents 4005daa + 8964906 commit 83b7166

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

layouts/partials/welcome.html

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,19 @@
5151
<div class = "row">
5252
<div class="col-xs-12 col-md-8">
5353
<h1 class = "welcome-page">devopsdays {{$e.city}}</h1>
54-
<span class="welcome-page-date">
55-
{{- if $e.startdate -}}
56-
{{- if ne $e.startdate $e.enddate }}
57-
{{- dateFormat "January 2" $e.startdate -}} - {{- dateFormat "2, 2006" $e.enddate -}}
58-
{{- else -}}
59-
{{- dateFormat "January 2" $e.startdate -}}
60-
{{- end -}}
61-
{{ end }}
62-
</span>
54+
55+
{{- if $e.startdate -}}
56+
{{- if or (ne (time $e.startdate).Month (time $e.enddate).Month) (ne (time $e.startdate).Day (time $e.enddate).Day) -}}
57+
<span class="welcome-page-date">
58+
{{ dateFormat "January 2" $e.startdate }} - {{ dateFormat "2, 2006" $e.enddate }}<br />
59+
</span>
60+
{{- else -}}
61+
<span class="welcome-page-date">
62+
{{ dateFormat "January 2, 2006" $e.startdate }}<br />
63+
</span>
64+
{{- end -}}
65+
{{- end -}}
66+
6367
<br />
6468

6569
{{- if $e.location -}}

0 commit comments

Comments
 (0)