mirror-nourybot/pkg/humanize/time.go

14 lines
211 B
Go
Raw Normal View History

2021-10-14 02:27:01 +02:00
package humanize
import (
"time"
"github.com/dustin/go-humanize"
)
2021-10-16 17:59:30 +02:00
// Time returns a more human readable
2021-10-14 02:27:01 +02:00
// time as a string for a given time.Time
2021-10-16 17:59:30 +02:00
func Time(t time.Time) string {
2021-10-14 02:27:01 +02:00
return humanize.Time(t)
}