He it is Who gave the sun radiance and the moon light , and determined the stages ( for the waxing and waning of the moon ) that you may learn the calculation of years and the reckoning of time . Allah has created all this with a rightful purpose ( rather than out of play ) .