aboutsummaryrefslogtreecommitdiffstats
path: root/modules/templates/helper.go
diff options
context:
space:
mode:
authorRené Schaar <rene@schaar.priv.at>2022-02-15 17:50:10 +0100
committerGitHub <noreply@github.com>2022-02-16 00:50:10 +0800
commit609c91665e5e4d6da50af0b2168d6cb46f9d6273 (patch)
tree974e777fbd7262162c4f3b237f3688178962e89c /modules/templates/helper.go
parent2be49dee71af997ed944c177a090aeb3e6d606e8 (diff)
downloadgitea-609c91665e5e4d6da50af0b2168d6cb46f9d6273.tar.gz
gitea-609c91665e5e4d6da50af0b2168d6cb46f9d6273.zip
Fix display time of milestones (#18753)
* Fix display time of milestones * Move the SecToTime function From the models/issue_stopwatch.go file to the modules/util package * Rename the sec_to_time file * Updated formatting * Include copyright notice in sec_to_time.go * Apply PR review suggestions - Update copyright notice dates to 2022 - Change `1 day 3h 5min 7s` to `1d 3h 5m 7s` * Rename hrs var and combine conditions * Update unit tests to match new time pattern Changed `1min` to `1m` Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules/templates/helper.go')
-rw-r--r--modules/templates/helper.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go
index 255866e2ed..63c165bc8b 100644
--- a/modules/templates/helper.go
+++ b/modules/templates/helper.go
@@ -256,7 +256,7 @@ func NewFuncMap() []template.FuncMap {
},
"Printf": fmt.Sprintf,
"Escape": Escape,
- "Sec2Time": models.SecToTime,
+ "Sec2Time": util.SecToTime,
"ParseDeadline": func(deadline string) []string {
return strings.Split(deadline, "|")
},
@@ -447,7 +447,7 @@ func NewTextFuncMap() []texttmpl.FuncMap {
},
"Printf": fmt.Sprintf,
"Escape": Escape,
- "Sec2Time": models.SecToTime,
+ "Sec2Time": util.SecToTime,
"ParseDeadline": func(deadline string) []string {
return strings.Split(deadline, "|")
},