use localized date for further events

This commit is contained in:
Jakub 2024-02-27 00:15:51 -05:00
parent 6b221f66f5
commit 758ccf59f5

View File

@ -189,7 +189,7 @@
{{ range sort (where .Site.RegularPages "Section" "events") "Params.start_date" "asc" }}
{{ $eventDate := time.AsTime .Params.start_date }}
{{ if and ( or ($eventDate.After $startDate) ($eventDate.Equal $startDate)) ($eventDate.Before $endDate) }}
<li>{{$eventDate.Format "Jan 2, 2006" }} - <a href="{{ .RelPermalink }}">{{.Title}}</a></li>
<li>{{$eventDate | time.Format ":date_medium" }} - <a href="{{ .RelPermalink }}">{{.Title}}</a></li>
{{ end }}
{{ end }}
</ul>