登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
AI 队友
登录
注册
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
1
Star
0
Fork
69
王军
/
carbon
forked from
dromara
/
carbon
确定同步?
同步操作将从
dromara/carbon
强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
删除在远程仓库中不存在的分支和标签
同步 Wiki
(当前仓库的 wiki 将会被覆盖!)
取消
确定
代码
Issues
0
Pull Requests
0
Wiki
统计
流水线
服务
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
我知道了,不再自动展开
标签
标签名
描述
提交信息
操作
v2.6.0
- `golang` 最低版本依赖升级到 `1.18` - `carbon`, `julian`, `lunar`, `persian` 从值传递改成指针传递 - 新增 `ZoneName` 方法获取时区名称 - 新增 `HasError` 方法判断是否有错误 - 新增 `IsNil` 方法判断是否是 `nil` - 新增 `Copy` 方法对 `carbon` 进行深度复制 - 新增示例文件 `xxx_example.go` - 新增`constant.go` 文件,将常量从 `carbon.go` 文件迁移到此文件 - 默认全局时区从 `Local` 更改为 `UTC` - `Offset` 方法更名为 `ZoneOffset` - `IsSetTestNow` 方法更名为 `IsTestNow` - `UnSetTestNow ` 方法更名为 `CleanTestNow` - 移除 `Location` 方法,由 `Timezone` 方法替代 - 更改 `IsValid` 和 `IsInvalid` 方法判断逻辑,`zero time` 不再视为无效时间 - 设置全局默认时区时同步更新 `time.Local` - 重构 `database.go`,移除 `carbon.DateTime`、`carbon. DateTimeMilli `、 `carbon.DateTimeMicro`、`carbon.DateTimeNano`、 `carbon. Date`、`carbon.DateMilli`、 `carbon.DateMicro`、 `carbon.DateNano`、 `carbon.Time`、 `carbon.TimeMilli`、 `carbon.TimeMicro`、 `carbon.TimeNano`、`carbon.Timestamp` 、`carbon.TimestampMilli ` 、`carbon.TimestampMicro`、`carbon.TimestampNano` 字段类型, 使用泛型字段替代以实现 `MarshalJSON/UnmarshalJSON` 时自定义输出格式
6f6cb25
2025-03-24 22:28
下载
v2.5.4
**完整的更新日志**: https://gitee.com/dromara/carbon/commits/v2.5.4
89cf2b3
2025-03-05 14:19
下载
v2.5.2
- 修复 `Time`, `TimeMilli`, `TimeMicro`, `TimeNano` 字段进行`UnmarshalJSON` 时无法解析的 bug - 移除弃用的方法 `ToStdTime` - 公历新增 `MaxValue`, `MinValue`, `IsValid ` 方法 - 农历新增 `MaxValue`, `MinValue`, `IsValid ` 方法 - 波斯历(伊朗历)新增 `MaxValue`, `MinValue`, `ToShortMonthString`, `ToShortWeekString` 方法 - 波斯历(伊朗历) `ToMonthString`, `ToWeekString` 方法新增可选参数`locale`,可选值 `en`/`fa` - 农历,波斯历(伊朗历)等增加日期合法性判断
4555e1e
2024-12-03 10:19
下载
v2.5.1
* 增加 `MaxValue`,`MinValue` 方法 * 增加参考项目 * 优化 `IsValid` 方法判断逻辑,基 `MinValue`, `MinValue` 方法 * `Time`, `TimeMilli`, `TimeMicro`, `TimeNano` 结构体进行 `UnmarshalJSON` 时设置默认年月日为当前时间 * 修复日文翻译错误 * `github.com/stretchr/testify` 从 `1.9.0` 升级到 `1.10.0` **完整的更新日志**: https://gitee.com/dromara/carbon/commits/v2.5.1
e458c17
2024-11-29 15:57
下载
v2.5.0
## What's Changed * Change repository url from `github.com/golang-module/carbon` to `github.com/dromara/carbon` * Add `hungarian` translation #39 by @kenlas in https://github.com/dromara/carbon/pull/252 * Add support for `string` and `[]byte` types when parsing database data in `Scan` method #251 * Retranslate `README.jp` by @You-saku in https://github.com/dromara/carbon/pull/259 * Fix `DiffInMonths()` method bug #255 * Fix `Japanese` translation by @nkmr-jp in https://github.com/dromara/carbon/pull/254 * Replace `Lock()` with `RLock()`,`Unlock()` with `RUnlock()` to optimize performance by @ritbrz in https://github.com/dromara/carbon/pull/253 * Replace `ToDateTimeStruct()` with `NewDateTime()`,`ToDateTimeMilliStruct()` with `NewDateTimeMilli()`,`ToDateTimeMicroStruct()` with `NewDateTimeMicroStruct()`,`ToDateTimeMilliNanoStruct()` with `NewDateTimeNano()` * Replace `ToDateStruct()` with `NewDate()`,`ToDateMilliStruct()` with `NewDateMilli()`,`ToDateMicroStruct()` with `NewDateMicro()`,`ToDateNanoStruct()` with `NewDateNano()` * Replace `ToTimeStruct()` with `NewTime()`,`ToTimeMilliStruct()` with `NewTimeMilli()`,`ToTimeMicroStruct()` with `NewTimeMicro()`,`ToTimeNano()Struct` with `NewTimeNano()` * `DateTime`, `DateTimeXXX`,`Date`,`DateXXX`, `Time`,`TimeXXX` structures implement `Scan`,`Value`,`MarshalJSON`,`UnmarshalJSON` interfaces * Bump `codecov/codecov-action` from 4 to 5 by @dependabot in https://github.com/dromara/carbon/pull/256 * Unified use of global default timezone `defaultTimezone` when `UnmarshalJSON` ## New Contributors * @kenlas made their first contribution in https://github.com/dromara/carbon/pull/252 * @nkmr-jp made their first contribution in https://github.com/dromara/carbon/pull/254 * @You-saku made their first contribution in https://github.com/dromara/carbon/pull/259 **Full Changelog**: https://github.com/dromara/carbon/compare/v2.4.1...v2.5.0
81e2ed3
2024-11-25 17:54
下载
v2.4.1
**完整的更新日志**: https://gitee.com/golang-module/carbon/commits/v2.4.1
ff4171a
2024-10-17 15:15
下载
v2.4.0
**完整的更新日志**: https://gitee.com/golang-module/carbon/commits/v2.4.0
1ef540a
2024-10-11 23:51
下载
v2.3.11
- Add parsing support for `2006-01-02 15:04:05-0700 MST` format in `Parse` method - Change the judgment logic of `IsValid` and `IsInvalid` methods - Implement `Abs` method by itself in `DiffAbsInDuration` method #226 - Return zero time instead of being empty where the value is zero time in `Parse` method #232 - Unified unit test format
02dcd16
2024-04-10 10:49
下载
v2.3.10
v2.3.10
a08087e
2024-03-06 09:26
下载
v2.3.9
- 新增 `DiffInDuration`、`DiffAbsInDuration` 方法 - `calendar/persian` 子包添加注释 - 简化 `calendar.go`、`constellation.go` 代码 - 提供单元测试和性能测试覆盖率
e28be0d
2024-02-20 11:14
下载
v2.3.8
增加 波斯历 支持
e3eddc8
2024-02-01 15:43
下载
v2.3.7
增加 儒略日/简化儒略日 支持
aa61ffe
2024-01-26 10:40
下载
v2.3.6
- 将日历提取出来作为独立子包 - 新增 `CreateFromLunar` 方法,从 `农历日期` 创建 `Carbon` 实例 - 修复 `ToMonthString`, `ToShortMonthString`, `ToWeekString`, `ToShortWeekString`, `Season , `Constellation` 方法并发读写错误 - 提供单元测试和性能测试覆盖率
4eb7423
2024-01-22 17:08
下载
v2.3.5
- `Default` 结构体新增 `Locale` 字段用于设置全局当地语言 - 新增时区常量 - 新增 `IsAM`和 `IsPM` 方法 - 新增 `Max`和 `Min` 方法 - 优化 `LoadTag` 方法,将 `strings.Contains` 改成 `strings.HasPrefix` - 提高单元测试和性能测试覆盖率
f3a3038
2024-01-12 10:57
下载
v2.3.4
- 新增 `Default` 结构体和 `SetDefault` 方法用于设置全局默认值 - 将 `SetLanguage` 方法从 `setter.go` 移动到 `language.go` - `SetLocale` 和 `SetResources` 方法返回 `*Language` - 提供单元测试和性能测试覆盖率
59860f4
2024-01-07 20:08
下载
v2.3.3
**完整的更新日志**: https://gitee.com/golang-module/carbon/commits/v2.3.3
08b0acc
2024-01-04 10:13
下载
v2.3.2
- 新增 `tag` 结构体,优化 `LoadTag` 方法 - 将 `encoding.go` 文件中 `MarshalJSON` 方法新增对 `U`,`V`,`X`,`Z` 的解析 - 优化 `database.go` 文件中的 `Scan` 方法,将默认时区设置为 `Local` - 优化 `outputer.go` 文件中 `String` 方法 - `CreateFromStdTime` 方法新增 `timezone` 可选参数 - 新增 `India` 时区常量 - 提高性能测试覆盖率
c02f573
2024-01-02 23:29
下载
v2.3.1
2bd4589
2023-12-28 14:35
下载
v2.3.0
0d77d78
2023-12-25 10:52
下载
v2.2.14
329fdbe
2023-11-30 18:06
下载
下载
请输入验证码,防止盗链导致资源被占用
取消
下载
Go
1
https://gitee.com/wang-jun-07/carbon.git
git@gitee.com:wang-jun-07/carbon.git
wang-jun-07
carbon
carbon
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册