Skip to content

feat: custom format #284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

feat: custom format #284

wants to merge 3 commits into from

Conversation

wln32
Copy link

@wln32 wln32 commented Mar 21, 2025

如标题所示,自定义序列化格式,我看到此前有许多issue需要一些自定义序列化逻辑的需求或是一些边界条件导致的bug,
但他们什么都做不了,只能等待Carbon下个版本增强或修复,
由此我希望能为Carbon添加自定义序列化函数,以满足不同需求,既能增强原有功能,也能在面对一些边界条件导致的bug时,使用者可以通过自定义序列化来手动解决,而不是等待Carbon修复
此pr不会破坏原有功能,只是增强且兼容。
目前只实现了Carbon,DateTime,Time 三种类型的自定义格式化逻辑

如果您认为不需要此功能的话,可以关掉
如果需要的话,我会补齐剩下的类型,并添加测试

@wln32 wln32 closed this Mar 22, 2025
@wln32 wln32 deleted the feat/custom-format branch March 22, 2025 23:48
@kuafuRace
Copy link
Collaborator

V2.6 is about to be released, and you can customize the output like this
https://github.com/dromara/carbon/blob/v2.6.x/README.cn.md#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%BE%93%E5%87%BA%E6%A0%BC%E5%BC%8F

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants