Skip to content
/ timeago Public
forked from simonhege/timeago

Go package for time formating based on current time (eg: "3 hours ago")

License

Notifications You must be signed in to change notification settings

bkali/timeago

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

timeago - A time formatting package

Install

go get github.com/xeonx/timeago

Docs

http://godoc.org/github.com/xeonx/timeago

Use

package main

import (
	"time"
	"github.com/xeonx/timeago"
)
	
func main() {
	t := time.Now().Add(42 * time.Second)
	
	s := timeago.English.Format(t)
	//s will contains "less than a minute ago"
	
	//...
}

Tests

go test is used for testing.

About

Go package for time formating based on current time (eg: "3 hours ago")

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Go 100.0%