Update 'funcmap.go'
add seconds maybe?
Original pull request patch:
From ed6179a77d7359b06d8e8507f5fc3aec0f1f4910 Mon Sep 17 00:00:00 2001
From: denmarkistrash <simonglobdob@gmail.com>
Date: Mon, 1 Jul 2019 15:08:29 +0200
Subject: [PATCH 1/2] Update 'funcmap.go'
---
funcmap.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/funcmap.go b/funcmap.go
index d7c0ef0..a9e515f 100644
--- a/funcmap.go
+++ b/funcmap.go
@@ -493,7 +493,7 @@ var funcMap = template.FuncMap{
},
"htmlescaper": template.HTMLEscaper,
"hhmm": func(seconds float64) string {
- return fmt.Sprintf("%02dh %02dm", int(math.Floor(seconds / 3600)), int(math.Floor(seconds / 60)) % 60)
+ return fmt.Sprintf("%02dh %02dm", int(math.Floor(seconds / 3600)), int(math.Floor(seconds / 60)) % 60, int(math.Floor(seconds * 60)) % 60)
},
}
--
2.20.1
From 5ba37e0cf1aafcbe5e69fbd475d13c72b8098078 Mon Sep 17 00:00:00 2001
From: denmarkistrash <simonglobdob@gmail.com>
Date: Mon, 1 Jul 2019 15:10:07 +0200
Subject: [PATCH 2/2] im stoopid
---
funcmap.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/funcmap.go b/funcmap.go
index a9e515f..bdb3959 100644
--- a/funcmap.go
+++ b/funcmap.go
@@ -493,7 +493,7 @@ var funcMap = template.FuncMap{
},
"htmlescaper": template.HTMLEscaper,
"hhmm": func(seconds float64) string {
- return fmt.Sprintf("%02dh %02dm", int(math.Floor(seconds / 3600)), int(math.Floor(seconds / 60)) % 60, int(math.Floor(seconds * 60)) % 60)
+ return fmt.Sprintf("%02dh %02dm %02ds", int(math.Floor(seconds / 3600)), int(math.Floor(seconds / 60)) % 60, int(math.Floor(seconds * 60)) % 60)
},
}
--
2.20.1