7
1
mirror of https://gitlab.com/ansol/web-ansol.org.git synced 2024-12-26 22:00:21 +00:00
web-ansol.org/themes/academic/layouts/partials/event-date.html

16 lines
694 B
HTML
Raw Normal View History

2023-03-31 16:46:28 +00:00
{{ with .Params.metadata.event.date }}
{{ if eq (time.Format "2 January 2006" .start) (time.Format "2 January 2006" .finish) }}
{{ if eq (time.Format "15:04" .start) (time.Format "15:04" .finish) }}
{{ time.Format "2 Jan 2006" .start }}
2023-03-31 16:46:28 +00:00
{{ else }}
{{ time.Format "2 Jan 2006" .start }},
{{ time.Format "15:04" .start }} —
2023-03-31 16:46:28 +00:00
{{ time.Format "15:04" .finish }}
{{ end }}
{{ else if eq (time.Format "January 2006" .start) (time.Format "January 2006" .finish) }}
{{ time.Format "2" .start }} a {{ time.Format "2 Jan 2006" .finish }}
2023-03-31 16:46:28 +00:00
{{ else }}
{{ time.Format "2 Jan 2006" .start }} a {{ time.Format "2 Jan 2006" .finish }}
2023-03-31 16:46:28 +00:00
{{ end }}
{{ end }}