Fixed undefined no of days

Fixed this issue.
nit; bring the { to the same line as the if and make sure you have spaces around the ()