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方法替代 - 移除
ParseByLayout和ParseByFormat方法对时间戳字符串的解析支持,解析时间戳请使用CreateFromTimestamp,CreateFromTimestampMilli,CreateFromTimestampMicro,CreateFromTimestampNano方法 - 优化
helper.go里getAbsValue方法,用位操作替换条件判断 - 优化
frozen.go文件里时间冻结相关方法,用原子操作减少锁竞争,优化内存分配 - 优化基准测试文件,覆盖
串行测试、并行测试和并发测试 - 新增韩语文档
README.ko.md - 新增
Sleep方法及相关单元测试、基准测试和示例文件 - 新增数字常量,如
MaxYear,MinYear,MaxMonth,MinMonth,MaxDay,MinDay等,并使用这些常量替换硬编码
English
- Change
Japanesetranslation file fromjp.jsontoja.jsonand rename document fromREADME.jp.mdtoREADME.ja.mdto comply with the ISO639-1 standard - Remove deprecated
ParseWithLayoutsmethod and replace withParseByLayoutsmethod - Remove deprecated
ParseWithFormatsmethod and replace withParseByFormatsmethod - Remove deprecated
CleanTestNowmethod and replace withClearTestNowmethod - Remove parsing support for timestamp strings from
ParseByLayoutandParseByFormatmethods, useCreateFromTimestamp,CreateFromTimestampMilli,CreateFromTimestampMicro,CreateFromTimestampNanoto parse timestamp strings - Optimize
getAbsValuemethod inhelper.goto replace conditional judgments withbitwise operation - Optimize the methods related to time freezing in
frozen.go, reduce lock contention usingatomic operationand optimize memory allocation - Optimize benchmark test files to cover
serialtesting,paralleltesting andconcurrenttesting - Add Korean readme document
README.ko.md - Add
Sleepmethod and relatedunit tests,benchmark tests, andexample file - Add number constants such as
MaxYear,MinYear,MaxMonth,MinMonth,MaxDay,MinDayetc. and replace hard coded with these constants
本作品采用《CC 协议》,转载必须注明作者和本文链接
关于 LearnKu
推荐文章: