Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 25, 2025

Bumps github.com/dromara/carbon/v2 from 2.5.2 to 2.6.0.

Release notes

Sourced from github.com/dromara/carbon/v2's releases.

v2.6.0 Break Change

English
  • golang minimum version dependency upgraded to 1.18
  • carbon, julian, lunar, persian changed from value passing to pointer passing
  • Add ZoneName method to get the time zone name
  • Add HasError method to check if there is an error
  • Add IsNil method to check if it is nil
  • Add Copy method to deep copy carbon
  • Add WeekStartsAt method to get start day of the week
  • Add example file xxx_example.go
  • Add a new constant.go file and migrate constants from the carbon.go file to this file
  • Change default global timezone from Local to UTC
  • Rename Offset method to ZoneOffset method
  • Rename IsSetTestNow method to IsTestNow method
  • Rename UnSetTestNow method to CleanTestNow method
  • Remove Location method, replaced by Timezone method
  • Change the judgment logic of IsValid and IsInvalid methods, zero time is no longer considered invalid time
  • Update time.Local when setting the global default timezone
  • Refactor database.go and remove 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 field types, use generic fields instead to implement custom output format when MarshalJSON/UnmarshalJSON
中文
  • golang 最低版本依赖升级到 1.18
  • carbon, julian, lunar, persian 从值传递改成指针传递
  • 新增 ZoneName 方法获取时区名称
  • 新增 HasError 方法判断是否有错误
  • 新增 IsNil 方法判断是否是 nil
  • 新增 Copy 方法对 carbon 进行深度复制
  • 新增 WeekStartsAt 方法获取周起始日期
  • 新增示例文件 xxx_example.go
  • 新增constant.go 文件,将常量从 carbon.go 文件迁移到此文件
  • 默认全局时区从 Local 更改为 UTC
  • Offset 方法更名为 ZoneOffset
  • IsSetTestNow 方法更名为 IsTestNow
  • UnSetTestNow 方法更名为 CleanTestNow
  • 移除 Location 方法,由 Timezone 方法替代
  • 更改 IsValidIsInvalid 方法判断逻辑,zero time 不再视为无效时间
  • 设置全局默认时区时同步更新 time.Local
  • 重构 database.go,移除 carbon.DateTimecarbon. DateTimeMilli carbon.DateTimeMicrocarbon.DateTimeNanocarbon. Datecarbon.DateMillicarbon.DateMicrocarbon.DateNanocarbon.Timecarbon.TimeMillicarbon.TimeMicrocarbon.TimeNanocarbon.Timestampcarbon.TimestampMilli carbon.TimestampMicrocarbon.TimestampNano 字段类型, 使用泛型字段替代以实现 MarshalJSON/UnmarshalJSON 时自定义输出格式

v2.5.4

  • add Norwegian language support, translated by bendikrb #281
  • add optional parameter time.Time in NewCarbon method
  • move all constant from carbon.go to a new constant.go

v2.5.3

  • add CurrentLayout method #279
  • fix parsing errors caused by empty strings #271 #275
  • unify receiver type #262
Commits
  • f44d158 fix: Add a check for invalid dates before setting language objects
  • ecb0c8d test: Add blank lines in the test function
  • 5d11429 test:Simplify Carbon_day example testing
  • 7ef65a6 refactor: ReSetDefault -> ResetDefault
  • 822d6c8 fix: Optimize timestamp parsing error handling
  • b797f7f refactor: Add invalidTimestampError
  • f0459a7 refactor(develop): invalidWeekStartsDayError -> invalidWeekStartsAtError
  • 2a27293 feat: Update error comment
  • befb502 test: Optimize the output format of test cases
  • de3b6a0 fix: Fix timezone issues before 1901, avoid returning to LMT (Local Mean Time...
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/dromara/carbon/v2](https://github.com/dromara/carbon) from 2.5.2 to 2.6.0.
- [Release notes](https://github.com/dromara/carbon/releases)
- [Commits](dromara/carbon@v2.5.2...v2.6.0)

---
updated-dependencies:
- dependency-name: github.com/dromara/carbon/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Mar 27, 2025

Superseded by #1298.

@dependabot dependabot bot closed this Mar 27, 2025
@dependabot dependabot bot deleted the dependabot/go_modules/github.com/dromara/carbon/v2-2.6.0 branch March 27, 2025 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant