首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >go-carbon v2.5.0 发布,轻量级、语义化、对开发者友好的 golang 时间处理库

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

原创
作者头像
够过瘾
发布2024-11-26 10:40:03
发布2024-11-26 10:40:03
1040
举报
文章被收录于专栏:go-carbongo-carbon

carbon 是一个轻量级、语义化、对开发者友好的 Golang 时间处理库,提供了对时间穿越、时间差值、时间极值、时间判断、星座、星座、农历、儒略日 / 简化儒略日、波斯历 / 伊朗历的支持。

carbon 目前已捐赠给 [dromara](https://dromara.org/ "dromara") 开源组织,已被 [awesome-go]( https://github.com/avelino/awesome-go#date-and-time "awesome-go") 收录,并获得 [gitee](https://gitee.com "gitee") 2024 年最有价值项目([GVP](https://gitee.com/gcp "GVP"))和 [gitcode](https://gitcode.com "gitcode") 2024 年度 [G-Star](https://gitcode.com/g-star "G-Star") 项目,如果您觉得不错,请给个 star 吧

[github.com/dromara/carbon]( https://github.com/dromara/carbon "github.com/dromara/carbon")

[gitee.com/dromara/carbon]( https://gitee.com/dromara/carbon "gitee.com/dromara/carbon")

[gitcode.com/dromara/carbon]( https://gitcode.com/dromara/carbon "gitcode.com/dromara/carbon")

#### 更新日志

- 仓库地址从 `github.com/golang-module/carbon` 改成 `github.com/dromara/carbon`

- 增加对 `匈牙利` 的翻译支持,由 @kenlas 翻译

- 重新翻译 `日文版 README` 文件,由日本友人 @You-saku 翻译

- 修复 `DiffInMonths()` 计算错误的 bug

- `Lock()`、`Unlock()` 替换成 `RLock()`、`URnlock()`

- 删除 `ToDateTimeStruct()`、`ToDateTimeMilliStruct()`、`ToDateTimeMicroStruct()` 、`ToDateStruct()`

等方法,由新增的 `NewDateTime()`、`NewDateTimeMilli()`、`NewDateTimeMicro()`、NewDate() 等方法替换

- `DateTime`、`DateTimeXXX`、`Date`、`DateXXX`、`Time`、`TimeXXX` 等结构体实现 `Scan`、`Value`、`MarshalJSON`、`UnmarshalJSON` 接口

- `Scan` 接口实现时支持对 `string`、`[]byte`、`Time.time` 格式的解析支持

- `UnmarshalJSON` 解析 `json` 格式时间字符串时,统一使用全局默认时区 `defaultTimezon`

- `codecov/codecov-action` 从 `v4` 升级到 `v5`

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档