Thank you for your suggestions, but shouldn’t night automatically get shortened based on the factors I included ? (longitude , latitude , day of year). I am not good in geography , so I did a lot of research , mainly in NASA’s official website , to get these equations close to reality. And night does get shortened during summer in India, so if you give the accurate latitude and day of year , you will get the exact result(not considering moon’s perturbations…yet)