Added day out of bounds exception.
Added error checking.