go-carbon v2.4.0 发布,轻量级、语义化、对开发者友好的 golang 时间处理库

1次阅读

共计 700 个字符,预计需要花费 2 分钟才能阅读完成。

carbon 是一个轻量级、语义化、对开发者友好的 golang 时间处理库,支持链式调用。

目前已被 awesome-go 收录,如果您觉得不错,请给个 star 吧

github.com/golang-module/carbon

gitee.com/golang-module/carbon

安装使用

Golang 版本大于等于 1.17
// 使用 github 库
go get -u github.com/golang-module/carbon/v2

import "github.com/golang-module/carbon/v2"

// 使用 gitee 库
go get -u gitee.com/golang-module/carbon/v2

import "gitee.com/golang-module/carbon/v2"
Golang 版本小于 1.17
// 使用 github 库
go get -u github.com/golang-module/carbon

import "github.com/golang-module/carbon"

// 使用 gitee 库
go get -u gitee.com/golang-module/carbon

import  "gitee.com/golang-module/carbon"

更新日志

  • go 的最低版本要求升级到1.17
  • 增加对 阿拉伯语 的翻译支持
  • 修复 公历 农历 错误的 bug
  • 修复 波斯语 的翻译错误的 bug
  • 优化对 ParseByLayoutgetLocationByTimezone 方法的时区参数为空时的处理
  • 优化 json 字符串里的值有空或者 nul 时进行 json.UnmarshalJSON反序列化的处理
  • 移除 Tag 结构体和相关方法
正文完
 0