Calculate hours of daylight for any date.
Day length depends on only two things: your latitude and the sun's declination, which swings between plus and minus 23.44 degrees over the year. The sunrise hour angle follows from their tangents, and doubling it converts to hours at 15 degrees per hour. Civil twilight extends usable light by taking the sun to 6 degrees below the horizon, which adds well over an hour at high latitudes in summer.
Day length
Declination = 23.44 x sin(360/365 x (day - 81)); cos(hour angle) = -tan(latitude) x tan(declination); daylight hours = 2 x hour angle / 15
Because solar declination is zero, which makes the hour angle 90 degrees at every latitude — twelve hours of daylight regardless of where you are.
The period when the sun is up to 6 degrees below the horizon and there is still enough light for most outdoor activity without artificial lighting.
Beyond the polar circles the sun can stay above or below the horizon for whole days, and the hour angle formula no longer has a solution.