How to calculate the number of days solar energy is running