go-carbon 1.2.5 版本发布,新增 carbon 和 time.Time 互转方法

2021年1月18日   |   by tgcode

carbon 是一个轻量级、语义化、对开发者友好的Golang时间处理库,支持链式调用、农历和gorm、xorm等主流orm

如果您觉得不错,请给个 star 吧
github:github.com/golang-module/carbon
gitee:gitee.com/go-package/carbon

// Go 内置 Time.time 转 Carbon
carbon.CreateFromGoTime(time.Now())
// Carbon 转 Go 内置 Time.time
carbon.Now().ToGoTime()

更新日tgcode志

  • 更新readme.md文档
  • 修复已知错误
  • 将const.go改名为constant.go
  • 新增CreateFromGoTime()方法将time.Time转为carbon实例
  • 新增ToGoTime()方法将carbon实例转为time.Time

展开阅读全文

0 收藏

相关推荐: 上汽、阿里等共同打造!智己汽车品牌正式发布 主打高端市场

  1 月 13 日,由上汽集团、阿里巴巴集团以及浦东新区三大巨头联合推出的高端汽车品牌——智己汽车正式发布,并在上海中心、英国伦敦和美国 tgcodeCES 三地同时举办。   除了此次发布的产品外,在 2021 年上海国际车展智己汽车还会带来 3 款产品,…

Tags: , , ,