Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a function to localize the SEASON_CHANGE event #51

Open
Deuchnord opened this issue Mar 1, 2022 · 0 comments
Open

Add a function to localize the SEASON_CHANGE event #51

Deuchnord opened this issue Mar 1, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@Deuchnord
Copy link
Member

Deuchnord commented Mar 1, 2022

Is your feature request related to a problem? Please describe.
When a SEASON_CHANGE happens, the details contains the name of the month only. Even though it is expected to make it position-independent, it would be appreciated to provide a way to localize it depending on the latitude.

Describe the solution you'd like
Add a new function taking a SeasonType value and a position in arguments and returning a localized event depending on the position:

class LocalizedSeasonType(SeasonType):
    WINTER
    SPRING
    SUMMER
    AUTUMN

def get_localized_season(season: SeasonType, position: Position) -> LocalizedSeasonType

The returned value depends on the latitude. If it is exactly zero, then an exception explaining that the season cannot be localized should be thrown.

Describe alternatives you've considered
Currently, the only way to localize he season is to do it in user code.

@Deuchnord Deuchnord added enhancement New feature or request good first issue Good for newcomers labels Mar 1, 2022
@Deuchnord Deuchnord added this to the v1.1 milestone Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant