Added method to check if it is night time and added the test