This simple sunlight tool calculates the days since last solstice, the equivalent day (in sunlight hours) from the period leading up to it, and the next solstice or equinox event.
- Python 3.x
ephem
The script includes inline metadata, so if you are using uv, you can can simply add the following function (or alias) to your shell config:
function sunlight {
uv run --quiet /path/to/sunlight-tool/sunlight.py
}66 days since solstice (equivalent of 16 October 2023)
Next equinox in 22 days (20 March 2024)