mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-20 14:00:04 +02:00
Remove the "PHP" style formatting function
The "PHP" formatting function doesn't add anything, except an undocumented date format. All usages in the templates have been replaced with DateFmtShort and DateFmtLong for convenience.
This commit is contained in:
parent
d85366930c
commit
7759b9ee6e
10 changed files with 22 additions and 72 deletions
|
@ -126,8 +126,13 @@ var TemplateFuncs template.FuncMap = map[string]interface{}{
|
|||
return a + b
|
||||
},
|
||||
"ActionIcon": ActionIcon,
|
||||
"DateFormat": DateFormat,
|
||||
"List": List,
|
||||
"DateFmtLong": func(t time.Time) string {
|
||||
return t.Format(time.RFC1123Z)
|
||||
},
|
||||
"DateFmtShort": func(t time.Time) string {
|
||||
return t.Format("Jan 02, 2006")
|
||||
},
|
||||
"List": List,
|
||||
"Mail2Domain": func(mail string) string {
|
||||
if !strings.Contains(mail, "@") {
|
||||
return "try.gogs.io"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue