We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c1931e commit bd5db65Copy full SHA for bd5db65
datetime/minutes.go
@@ -2,6 +2,7 @@ package datetime
2
3
import (
4
"math"
5
+ "strings"
6
"time"
7
)
8
@@ -27,5 +28,5 @@ func (m Minutes) Value() int {
27
28
}
29
30
func (m Minutes) String() string {
- return m.duration.String()
31
+ return strings.TrimSuffix(m.duration.String(), "0s")
32
datetime/minutes_test.go
@@ -30,7 +30,7 @@ func TestMinutes_Value(t *testing.T) {
func TestMinutes_String(t *testing.T) {
33
- expected := "23m0s"
+ expected := "23m"
34
actual := datetime.NewMinutes(23).String()
35
36
assert.Equal(t, expected, actual)
0 commit comments