8000 GitHub - sanchezpaco/go-timeit: Go package for splitting time into multiple units
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sanchezpaco/go-timeit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-timeit

Build Status

go-timeit is an utility that calculate the absolute real time from a given milliseconds quantity.

Usage

Get the package:

$ go get github.com/sanchezpaco/go-timeit/timeit

Import the package into your project:

import "github.com/sanchezpaco/go-timeit/timeit"

Use it!

myTimeInMilliseconds := 28809412823.0

timePassed := timeit.TimeIt(myTimeInMilliseconds)

// Result:
// {
//  "Years": 1,
//  "Months": 9,
//  "Weeks": 0,
//  "Days": 1,
//  "Hours": 6,
//  "Minutes": 36,
//  "Seconds": 41
// }

Running the tests

Inside timeit folder run:

$ go test

Versioning

In general, go-github follows semver

Authors

License

This library is distributed under the GNU General Public License found in the LICENSE file.

About

Go package for splitting time into multiple units

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0