carbon 是一个轻量级、语义化、对开发者友好的Golang时间处理库,支持链式调用、农历和gorm、xorm等主流orm
如果您觉得不错,请给个 star 吧
github:github.com/golang-module/carbon
gitee:gitee.com/go-package/carbon
// 使用github库
go get -u github.com/golang-module/carbon
import (
"github.com/golang-module/carbon"
)
// 使用gitee库
go get -u gitee.com/go-package/carbon
import (
"gitee.com/go-package/carbon"
)
更新日志
- 新增测试覆盖率报告文件coverage.html
- CreateFromTimestamp()方法支持秒、毫秒、微秒、纳秒级时间戳
- 新增ToTimestampWithSecond()方法获取秒级时间戳,等价于ToTimestamp()
- 新增ToTimestampWithMillisecond()方法获取毫秒级时间戳
- 新增ToTimestampWithMicrosecond()方法获取微秒级时间戳
- 新增ToTimestampWithNanosecond()方法获取微秒级时间戳