Skip to content
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

The W format in the FormatString method does not conform to the ISO-8601 standard, and there is no automatic zero padding #163

Closed
zxdstyle opened this issue Jan 4, 2023 · 1 comment
Labels
Bug Report a reproducible bug or regression

Comments

@zxdstyle
Copy link

zxdstyle commented Jan 4, 2023

Hello,

I encountered an issue with the following code:

carbon.Parse("2023-01-04 13:14:15").Format("YW")

golang version:1.18

carbon version: 2.1.9

I expected to get:

202301

But I actually get:

20231

Thanks!

@zxdstyle zxdstyle added the Bug Report a reproducible bug or regression label Jan 4, 2023
@Issues-translate-bot Issues-translate-bot changed the title FormatString 方法中的 W 格式不符合ISO-8601标准,没有自动补零 The W format in the FormatString method does not conform to the ISO-8601 standard, and there is no automatic zero padding Jan 4, 2023
@gouguoyin
Copy link
Collaborator

Fixed in v1.7.3 and v2.2.3

@gouguoyin gouguoyin reopened this Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report a reproducible bug or regression
Projects
None yet
Development

No branches or pull requests

2 participants