~samwhited/reltime

reltime/reltime_example_test.go -rw-r--r-- 142 bytes
b861844fSam Whited .github: auto close PRs and mirror from SourceHut 1 year, 1 month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package reltime

import (
	"fmt"
	"time"
)

func ExampleAgo() {
	s := Ago(-24 * time.Hour)
	fmt.Println(s)

	// Output:
	// about a day ago
}