Skip to content

Add a function to localize the SEASON_CHANGE event #51

@Deuchnord

Description

@Deuchnord

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Ready

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions