From eb0ce67f96432ab98254dd116e7eb3ac06254942 Mon Sep 17 00:00:00 2001 From: RandomChars <random@chars.jp> Date: Wed, 22 Dec 2021 16:20:15 +0900 Subject: [PATCH] format date in a language-agnostic manner since idk any turkish and go stdlib probably doesn't either format in prize xattr --- assets/templates/index.tmpl | 1 + tournament.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/templates/index.tmpl b/assets/templates/index.tmpl index 5137f56..cdc9438 100644 --- a/assets/templates/index.tmpl +++ b/assets/templates/index.tmpl @@ -27,6 +27,7 @@ class="live-btn">Canlı Yayın!</a> {{end}} <h5>{{index .Attributes "title"}}</h5> + <span>{{index .Attributes "prize"}}</span> <span>{{.StartTimeFormatted}}</span> </div> </li> diff --git a/tournament.go b/tournament.go index 78ccf86..b5f90d8 100644 --- a/tournament.go +++ b/tournament.go @@ -154,7 +154,7 @@ func populateTournaments(ts []*tournament) { } func populateTournament(t *tournament) { - t.StartTimeFormatted = t.StartTime.Format("Mon, 02 Jan 2006") + t.StartTimeFormatted = t.StartTime.Format("02/01/2006") t.TimePresent = time.Now().After(t.StartTime) t.EnrollmentOverdue = time.Now().After(t.Deadline) } -- GitLab