fix(go): accept single-digit day/month in attendance date headers #22
Reference in New Issue
Block a user
Delete Branch "fix/go-attendance-date-parser"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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).