Made 'member since' dates fit the user profile's sidebar

This commit is contained in:
Asaf Gartner 2024-07-06 12:39:56 +03:00
parent 6489ff522e
commit d4a17c8482
2 changed files with 4 additions and 1 deletions

View File

@ -88,7 +88,7 @@
<div class="pair flex"> <div class="pair flex">
<div class="key flex-auto flex-shrink-0 mr2">Member since</div> <div class="key flex-auto flex-shrink-0 mr2">Member since</div>
<div class="value projectlink truncate">{{ absoluteshortdate .ProfileUser.DateJoined }}</div> <div class="value projectlink truncate">{{ absoluteshortdateabbrv .ProfileUser.DateJoined }}</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -190,6 +190,9 @@ var HMNTemplateFuncs = template.FuncMap{
"absoluteshortdate": func(t time.Time) string { "absoluteshortdate": func(t time.Time) string {
return t.UTC().Format("January 2, 2006") return t.UTC().Format("January 2, 2006")
}, },
"absoluteshortdateabbrv": func(t time.Time) string {
return t.UTC().Format("Jan 2, 2006")
},
"rfc3339": func(t time.Time) string { "rfc3339": func(t time.Time) string {
return t.UTC().Format(time.RFC3339) return t.UTC().Format(time.RFC3339)
}, },