Carbon is a simple, semantic and developer-friendly golang package for datetime.
Carbon has been included by awesome-go , if you think it is helpful, please give me a star.
github.com/golang-module/carbon
Installation
Go version >= 1.16
go get -u github.com/golang-module/carbon/v2
import (
"github.com/golang-module/carbon/v2"
)
Go version < 1.16
go get -u github.com/golang-module/carbon
import (
"github.com/golang-module/carbon"
)
Change log
- Fix the bug that the translation json file cannot be loaded in window system #111 #139
- Add Parse() method supported formats
- Add support for go1.19
- Add unit test cases
- Move Now(), Tomorrow(), Yesterday() methods from carbon.go to traveler.go