carbon 是一个轻量级、语义化、对开发者友好的 Golang 时间处理库,提供了对时间穿越、时间差值、时间极值、时间判断、星座、星座、农历、儒略日 / 简化儒略日、波斯历 / 伊朗历的支持。 carbon 目前已捐赠给 dromara 开源组织,已被 awesome-go 收录,并获得 gitee 2024 年最有价值项目(GVP)和 gitcode 2024 年度 G-Star 项目,如果您觉得不错,请给个 star 吧 github.com/dromara/carbon gitee.com/dromara/carbon gitcode.com/dromara/carbon 更新日志 修复 Time, TimeMilli, TimeMicro, TimeNano 字段进行UnmarshalJSON 时无法解析的 bug移除弃用的方法 ToStdTime公历新增 MaxValue, MinValue, IsValid 方法农历新增 MaxValue, MinValue, IsValid 方法波斯历(伊朗历)新增 MaxValue, MinValue, ToShortMonthString, ToShortWeekString 方法波斯历(伊朗历) ToMonthString, ToWeekString 方法新增可选参数locale,可选值 en/fa农历,波斯历(伊朗历)等增加日期合法性判断