Wikipedia says it's indeed not a trivial thing
https://en.wikipedia.org/wiki/Solstice#Solstice_determinatio...