Skip to content
/ timeago Public

A small golang library to make calculation of time duration easier

License

Notifications You must be signed in to change notification settings

ararog/timeago

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

timeago

Build Status Coverage Status

TimeAgo is a library used to calculate how much time has been passed between two dates, this library is mainly based on time type of go.

Example

import (
  "fmt"
  "time"
  timeago "github.com/ararog/timeago"
)

d, _ := time.ParseDuration("-3h")
start := time.Now()
end := time.Now().Add(d)
got, _ := timeago.TimeAgoWithTime(start, end)
fmt.Printf("Output: %s\n", got)

About

A small golang library to make calculation of time duration easier

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages