public boolean isSun ( ZonedDateTime currentDate ) { if ( getSun ( ) . getNeverRise ( ) ) { return false ; } else if ( getSun ( ) . getNeverSet ( ) ) { return true ; } return timeWithinPeriod ( currentDate ) ; }
Check if the sun is shining for a given time .