Refactored the getWeatherByDay and time to remove the validation logic.