daylight
daylight
#
daylight — the stretch of a day the sun stands above some altitude.
daylight(location, around, lowest_degrees=0.0, step=timedelta(minutes=1))
#
Every step of the stretch the sun stands above lowest_degrees that holds around.
When the sun is below lowest_degrees at around, the next such
stretch. lowest_degrees=0 is sunrise to sunset; -18 is first light
to last.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
location
|
Location
|
Where the sun is seen from. |
required |
around
|
datetime
|
The instant whose stretch to find; aware. |
required |
lowest_degrees
|
float
|
The sun's altitude the stretch stays above. |
0.0
|
step
|
timedelta
|
The time between instants. |
timedelta(minutes=1)
|
Returns:
| Type | Description |
|---|---|
Array[datetime]
|
The stretch's instants, |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the sun does not cross |