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

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

carbon 目前已捐赠给 dromara 开源组织,已被 awesome-go 收录,并获得 gitee 2024 年最有价值项目(GVP)和 gitcode 2024 年度 G-Star 项目,如果您觉得不错,请给个 star 吧


官网: carbon.go-pkg.com
github: github.com/dromara/carbon
gitee: gitee.com/dromara/carbon
gitcode: gitcode.com/dromara/carbon

中文
  • 日语翻译文件从 jp.json 改成 ja.json,说明文档从 README.jp.md 更名为 README.ja.md,以符合 ISO639-1 标准
  • 移除已弃用的 ParseWithLayouts 方法,用 ParseByLayouts 方法替代
  • 移除已弃用的 ParseWithFormats 方法,用 ParseByFormats 方法替代
  • 移除已弃用的 CleanTestNow 方法,用 ClearTestNow 方法替代
  • 移除 ParseByLayoutParseByFormat 方法对时间戳字符串的解析支持,解析时间戳请使用 CreateFromTimestamp, CreateFromTimestampMilli, CreateFromTimestampMicro, CreateFromTimestampNano 方法
  • 优化 helper.gogetAbsValue 方法,用位操作替换条件判断
  • 优化 frozen.go 文件里时间冻结相关方法,用原子操作减少锁竞争,优化内存分配
  • 优化基准测试文件,覆盖串行测试并行测试并发测试
  • 新增韩语文档 README.ko.md
  • 新增 Sleep 方法及相关单元测试基准测试示例文件
  • 新增数字常量,如 MaxYear, MinYear, MaxMonth, MinMonth, MaxDay, MinDay 等,并使用这些常量替换硬编码
English
  • Change Japanese translation file from jp.json to ja.json and rename document from README.jp.md to README.ja.md to comply with the ISO639-1 standard
  • Remove deprecated ParseWithLayouts method and replace with ParseByLayouts method
  • Remove deprecated ParseWithFormats method and replace with ParseByFormats method
  • Remove deprecated CleanTestNow method and replace with ClearTestNow method
  • Remove parsing support for timestamp strings from ParseByLayout and ParseByFormat methods, useCreateFromTimestamp, CreateFromTimestampMilli, CreateFromTimestampMicro, CreateFromTimestampNano to parse timestamp strings
  • Optimize getAbsValue method in helper.go to replace conditional judgments with bitwise operation
  • Optimize the methods related to time freezing in frozen.go, reduce lock contention using atomic operation and optimize memory allocation
  • Optimize benchmark test files to cover serial testing, parallel testing and concurrent testing
  • Add Korean readme document README.ko.md
  • Add Sleep method and related unit tests, benchmark tests, and example file
  • Add number constants such as MaxYear, MinYear, MaxMonth, MinMonth, MaxDay, MinDay etc. and replace hard coded with these constants
本作品采用《CC 协议》,转载必须注明作者和本文链接
讨论数量: 2

我有个疑惑,我看这个项目的不同Git平台的go.mod 都不一样,每次同步代码的时候都怎么处理的。

1天前 评论
普罗米修斯 (楼主) 1天前

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!
文章
90
粉丝
17
喜欢
126
收藏
99
排名:629
访问:1.2 万
私信
所有博文
社区赞助商