Skip to content

Commit 95bd567

Browse files
committed
have the month show if the days span multiple months
Signed-off-by: Toshaan Bharvani <[email protected]>
1 parent 65a66cd commit 95bd567

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

themes/devopsdays-theme/layouts/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@
4848
<br/>
4949
{{- if or (ne (time .startdate).Month (time .enddate).Month) (ne (time .startdate).Day (time .enddate).Day) -}}
5050
<span class="homepage-grid-date">
51-
{{ dateFormat "Jan 2" .startdate }} - {{ dateFormat "2, 2006" .enddate }}<br />
51+
{{ if ne (time .startdate).Month (time .enddate).Month }}
52+
{{ dateFormat "Jan 2" .startdate }} - {{ dateFormat "Jan 2, 2006" .enddate }}<br />
53+
{{ else }}
54+
{{ dateFormat "Jan 2" .startdate }} - {{ dateFormat "2, 2006" .enddate }}<br />
55+
{{ end }}
5256
</span>
5357
{{- else -}}
5458
<span class="homepage-grid-date">

0 commit comments

Comments
 (0)