parseDates was using "02.01.2006" / "01/02/2006" which require zero-padded fields. The Czech attendance sheet headers contain dates like 1.6.2026, 23.3.2026, 6.4.2026 — Go silently dropped those columns while Python's strptime accepted them.
Effect was a missing 2026-06 month entirely on /api/juniors, plus undercounted attendance for any month containing single-digit columns. Surfaced via make parity.
Fix: use the unpadded reference forms "2.1.2006" / "1/2/2006" — Go's time.Parse accepts both padded and unpadded inputs against them.
Test plan
cd go && go test ./internal/services/membership/... (new TestParseDates_SingleDigitDayMonth plus existing tests pass)
cd go && golangci-lint run ./internal/services/membership/... clean
After merge: restart make web-go; make parity should show fewer diffs (most junior-side discrepancies should be gone; remaining diffs are the vs/sync_id and message/amount type drifts).
## Summary
`parseDates` was using `"02.01.2006"` / `"01/02/2006"` which require zero-padded fields. The Czech attendance sheet headers contain dates like `1.6.2026`, `23.3.2026`, `6.4.2026` — Go silently dropped those columns while Python's `strptime` accepted them.
Effect was a missing `2026-06` month entirely on `/api/juniors`, plus undercounted attendance for any month containing single-digit columns. Surfaced via `make parity`.
Fix: use the unpadded reference forms `"2.1.2006"` / `"1/2/2006"` — Go's `time.Parse` accepts both padded and unpadded inputs against them.
## Test plan
- [x] `cd go && go test ./internal/services/membership/...` (new `TestParseDates_SingleDigitDayMonth` plus existing tests pass)
- [x] `cd go && golangci-lint run ./internal/services/membership/...` clean
- [ ] After merge: restart `make web-go`; `make parity` should show fewer diffs (most junior-side discrepancies should be gone; remaining diffs are the `vs`/`sync_id` and `message`/`amount` type drifts).
parseDates was using "02.01.2006" / "01/02/2006" which require
zero-padded fields. The Czech attendance sheet headers contain dates
like "1.6.2026", "23.3.2026", "6.4.2026" — Go silently dropped those
columns while Python's strptime accepted them. Effect was a missing
2026-06 month on /api/juniors plus undercounted attendance in any month
with single-digit columns; surfaced via make parity.
Use the unpadded reference forms "2.1.2006" / "1/2/2006" instead — Go's
time.Parse accepts both padded and unpadded inputs against them.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
kacerr
merged commit 092dff25a5 into main2026-05-07 23:39:03 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
parseDateswas using"02.01.2006"/"01/02/2006"which require zero-padded fields. The Czech attendance sheet headers contain dates like1.6.2026,23.3.2026,6.4.2026— Go silently dropped those columns while Python'sstrptimeaccepted them.Effect was a missing
2026-06month entirely on/api/juniors, plus undercounted attendance for any month containing single-digit columns. Surfaced viamake parity.Fix: use the unpadded reference forms
"2.1.2006"/"1/2/2006"— Go'stime.Parseaccepts both padded and unpadded inputs against them.Test plan
cd go && go test ./internal/services/membership/...(newTestParseDates_SingleDigitDayMonthplus existing tests pass)cd go && golangci-lint run ./internal/services/membership/...cleanmake web-go;make parityshould show fewer diffs (most junior-side discrepancies should be gone; remaining diffs are thevs/sync_idandmessage/amounttype drifts).