]> source.dussan.org Git - gitea.git/commitdiff
Remove unnecessary helper function `DateFmtLong` (#24343)
authorYarden Shoham <git@yardenshoham.com>
Wed, 26 Apr 2023 06:52:50 +0000 (09:52 +0300)
committerGitHub <noreply@github.com>
Wed, 26 Apr 2023 06:52:50 +0000 (02:52 -0400)
After #24317 this function is only used in one place where it is not
needed. I confirmed the timestamp still renders correctly

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
modules/templates/helper.go
templates/admin/cron.tmpl

index b7bef205603f33b5dd5cb85095c77357f1dac782..a290d389793213881970b62be961a9f60de121fd 100644 (file)
@@ -141,9 +141,6 @@ func NewFuncMap() []template.FuncMap {
                "TimeSinceUnix": timeutil.TimeSinceUnix,
                "DateTime":      timeutil.DateTime,
                "Sec2Time":      util.SecToTime,
-               "DateFmtLong": func(t time.Time) string {
-                       return t.Format(time.RFC3339)
-               },
                "LoadTimes": func(startTime time.Time) string {
                        return fmt.Sprint(time.Since(startTime).Nanoseconds()/1e6) + "ms"
                },
index 267da00759b56d4eb761829d1586cdced31151cd..6ab37ca3548442ae984b636e5bf0025fe072f91c 100644 (file)
@@ -21,7 +21,7 @@
                                                <td><button type="submit" class="ui green button" name="op" value="{{.Name}}" title="{{$.locale.Tr "admin.dashboard.operation_run"}}">{{svg "octicon-triangle-right"}}</button></td>
                                                <td>{{$.locale.Tr (printf "admin.dashboard.%s" .Name)}}</td>
                                                <td>{{.Spec}}</td>
-                                               <td>{{DateTime "full" (DateFmtLong .Next)}}</td>
+                                               <td>{{DateTime "full" .Next}}</td>
                                                <td>{{if gt .Prev.Year 1}}{{DateTime "full" .Prev}}{{else}}N/A{{end}}</td>
                                                <td>{{.ExecTimes}}</td>
                                                <td {{if ne .Status ""}}data-tooltip-content="{{.FormatLastMessage $.locale}}"{{end}} >{{if eq .Status ""}}—{{else if eq .Status "finished"}}{{svg "octicon-check" 16}}{{else}}{{svg "octicon-x" 16}}{{end}}</td>