Skip to content

Conversation

@robertbastian
Copy link
Member

@robertbastian robertbastian commented Dec 5, 2025

We should make people get the extended year through YearInfo, so that they are aware of the other year values that are not the extended year. This is also currently the only method from YearInfo that's also exposed on Date.

@robertbastian robertbastian force-pushed the extended-year branch 3 times, most recently from 6e4220c to eeb9b88 Compare December 9, 2025 16:49
@robertbastian robertbastian marked this pull request as ready for review December 18, 2025 15:43
Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm tiring of deprecated APIs in icu_calendar but won't block this if others agree.

@Manishearth
Copy link
Member

Manishearth commented Dec 19, 2025

I don't find this to be particularly necessary, since the name of the API is already somewhat clear that this isn't a regular year. Maybe my intuition on user behavior is incorrect?

I'm not strongly opposed.

My litmus test for deprecations like this is: will users be happy or annoyed to get a deprecation warning? Overall I think they would be annoyed here: it feels like an API consistency issue rather than a footgun issue.

That's not my only criterion, but it's a quick litmus test.

@hsivonen or @zbraniecki , thoughts?

@robertbastian
Copy link
Member Author

I think they will be happy. If you're naively looking for a numeric year value on the API, you find extended_year and year. year returns something complicated, so you just use extended_year, which might not be what you want. Forcing users to look at the different values we provider in year is beneficial for the majority of users.

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.

3 participants