How to detect if the player is seen by the sun?

I want to detect every player who's directly exposed to sunlight. Really simple, also it works through transparent blocks, but not trapdoors.

Continue to help post