Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 448 Bytes

README.md

File metadata and controls

37 lines (23 loc) · 448 Bytes

timeago - A time formatting package

Install

go get github.com/xeonx/timeago

Docs

You can see the docs page here

Use

package main

import (
 "time"

 "github.com/xeonx/timeago"
)

func main() {
 t := time.Now().Add(42 * time.Second)

 // 's' will contain "less than a minute ago"
 s := timeago.English.Format(t)

 //...
}

Tests

go test is used for testing.