mondart.com/mondarth-com/themes/mondarth/layouts/partials/date-with-conversion.html

12 lines
687 B
HTML
Raw Normal View History

2024-07-13 11:25:02 +01:00
{{ $sst := .start }}
{{ $t := .start.UTC }}
{{ $date := .start.Format "2006-01-02"}}
{{ $m := div (time.AsTime $date).Unix 60 }}
{{ $sh := .start.Hour }}
{{ $et := .start.Add (time.ParseDuration .duration) }}
{{ $eh := add $et.Hour (div $et.Minute 60.0) }}
{{ $fm := default "2 Jan, 2006 @ 15:04" site.Params.time_format}}
{{ if lt $eh $sh }}{{ $eh = 24}}{{end}}
<li>Session Start<a href="/session-start" class="link"><img src="/info.png" class="w100 mw5-ns" style="width: 16px" alt="Info on Start Time" /></a>: {{ $t.Format $fm }} UTC (<a href="https://www.worldtimebuddy.com/event?lid=14&h=14&sts={{$m}}&sln={{$sh}}-{{$eh}}&a=show" class="link">Get in your local timezone</a>)</li>