Skip to content

dalikewara/timego

Repository files navigation

timego

go.dev reference GitHub go.mod Go version GitHub tag (latest SemVer) GitHub license

timego provides custom helpers to handle tasks related to time.

Getting started

Installation

You can use the go get method:

go get github.com/dalikewara/timego

Usage

You can check all available helper functions through the related files above (add.go, diff.go, etc). For example, if you want to create a variable that stores expired time value, you can do like this:

timeNow := timego.Now()
expiredTimeAt := timego.AddMinutes(timeNow, 5)

and to check the expiration time, you can do:

if timego.IsExpired(timeNow, expiredTimeAt) {
	panic("time expired!")
}

Release

Changelog

Read at CHANGELOG.md

Credits

Copyright © 2023 Dali Kewara

License

MIT License

About

timego provides custom helpers to handle tasks related to time

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published