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

Incorrect usage of Y ('week-based-year') in date format patterns #158

Open
Marcono1234 opened this issue Oct 26, 2024 · 0 comments
Open

Comments

@Marcono1234
Copy link

Marcono1234 commented Oct 26, 2024

Hello,
multiple DateTimeFormatter patterns in this repository use Y. However, that is 'week-based-year'. Maybe they should rather use y ('year-of-era')?
This makes a difference near the end of some years where y is still the current year, but Y is already the next year. See for example https://errorprone.info/bugpattern/MisusedWeekYear or https://rules.sonarsource.com/java/type/Bug/RSPEC-3986 for details.

Affected:

HanSolo added a commit that referenced this issue Oct 28, 2024
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

No branches or pull requests

1 participant