Skip to content

fix(indexes)!: keep IndexConstituent.founded verbatim as a string - #396

Merged
benbenbang merged 1 commit into
mainfrom
fix/378-founded-year
Sep 30, 2026
Merged

benbenbang merged 1 commit into
mainfrom
fix/378-founded-year

Conversation

@benbenbang

Copy link
Copy Markdown
Member

The founded member on IndexConstituent was decoded as a date, but the
provider sends founding years in forms that are not dates: a single year
("1994"), several years joined by / ("1902/1985"), and only sometimes
a full date ("1982-12-01"). Parsing these as a date failed to decode
the whole response.

Change founded to a string across all bindings so the provider value is
preserved as sent: String in Rust, string in Go, and str in Python.
Callers must now compare or parse the string themselves instead of
treating it as a date. Fixtures and parity tests are updated to cover the
year, multi-year, and full-date forms.

BREAKING CHANGE: IndexConstituent.founded is now String (Rust) / string
(Go) / str (Python) holding the founding year(s) verbatim, e.g. "1994" or
"1902/1985"; it was a Date. Compare or parse the string instead of a date.

close #378

The `founded` member on `IndexConstituent` was decoded as a date, but the
provider sends founding years in forms that are not dates: a single year
(`"1994"`), several years joined by `/` (`"1902/1985"`), and only sometimes
a full date (`"1982-12-01"`). Parsing these as a date failed to decode
the whole response.

Change `founded` to a string across all bindings so the provider value is
preserved as sent: `String` in Rust, `string` in Go, and `str` in Python.
Callers must now compare or parse the string themselves instead of
treating it as a date. Fixtures and parity tests are updated to cover the
year, multi-year, and full-date forms.

BREAKING CHANGE: IndexConstituent.founded is now String (Rust) / string
(Go) / str (Python) holding the founding year(s) verbatim, e.g. "1994" or
"1902/1985"; it was a Date. Compare or parse the string instead of a date.

close #378
@benbenbang
benbenbang enabled auto-merge (rebase) September 30, 2026 15:01
@github-actions github-actions Bot added the enhancement New feature or request label Sep 30, 2026
@benbenbang
benbenbang merged commit ac87c1a into main Sep 30, 2026
9 checks passed
@benbenbang
benbenbang deleted the fix/378-founded-year branch September 30, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix!: IndexConstituent.founded is a year string, not a date

1 participant