Visual sunrise, sunset

My watchface Universe-3 has a seperate layer for hiding the sun (24hrs revolving), but this is a fixed layer so hiding the sun only from 6PM till 6AM. I want to replace this layer by a layer that hides the sun according to actual sunrise and sunset times. How do I create this layer (code)?

it depends on if your happy for the sun just to turn off at sunset and on at sunrise if you are the math is very easy but if you still want the cut fade you have its going to take a while for me to do for you