MCPcopy Create free account
hub / github.com/andeya/algorithm / RelTime

Function RelTime

go-humanize/times.go:59–91  ·  view source on GitHub ↗

RelTime formats a time into a relative string. It takes two times and two labels. In addition to the generic time delta string (e.g. 5 minutes), the labels are used applied so that the label corresponding to the smaller time is applied. RelTime(timeInPast, timeInFuture, "earlier", "later") -> "3

(a, b time.Time, albl, blbl string)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

TimeFunction · 0.85
TestRangeFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestRangeFunction · 0.68