Skip to content

Comments

gofmt: require fractional seconds to be all 0 or 9#30

Merged
rockorager merged 1 commit intomainfrom
fix-27
Apr 23, 2025
Merged

gofmt: require fractional seconds to be all 0 or 9#30
rockorager merged 1 commit intomainfrom
fix-27

Conversation

@rockorager
Copy link
Owner

If a '.' or ',' is followed by a '0' or '9', we require that all
sequential digits be the same as the first. This allows us to parse
something like "02.01.2006" properly. The '.01' previously would be
parsed as a fractional second with precision 1. Now, it is parsed as a
'.' delimiter and a "01" as the next hunk.

Fixes: #27

If a '.' or ',' is followed by a '0' or '9', we require that all
sequential digits be the same as the first. This allows us to parse
something like "02.01.2006" properly. The '.01' previously would be
parsed as a fractional second with precision 1. Now, it is parsed as a
'.' delimiter and a "01" as the next hunk.

Fixes: #27
@rockorager rockorager merged commit 5e6cf28 into main Apr 23, 2025
4 checks passed
@rockorager rockorager deleted the fix-27 branch July 22, 2025 13:52
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.

gofmt not compatible with . as date separator

1 participant