Solar Events Module
The solar events module provides types and data for solar events (solstices and equinoxes) used in calendar calculations.
solar_events
Classes
SolarEvent
dataclass
Represents a single solar event (a solstice or an equinox).
Attributes:
| Name | Type | Description |
|---|---|---|
type |
SolarEventType
|
The type of solar event. |
time |
datetime
|
The datetime of the solar event. |
Functions
localize
Return this solar event converted to a given timezone.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timezone
|
A tzinfo or ZoneInfo to convert the event time into. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
SolarEvent |
A new SolarEvent instance with time localized to the |
|
|
provided timezone. |
Source code in src/solcadre/solar_events.py
SolarEventType
Bases: Enum
Enumeration of the four solar event types (solstices and equinoxes).