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"
Change log
- Fix bug in
DiffInYears
andAge
methods #181 - Fix bug with lost time zone after
json.Unmarshal
#178 - Move
CreateFromStdTime
method fromcarbon.go
tocreator.go
- Move
ToStdTime
method fromcarbon.go
tooutputer.go
- Move deprecated methods as
FromStdTime
,Time2Carbon
andCarbon2Time
todeprecated.go
- Update
stretchr/testify
to v1.8.4