Date takes care of leap years etc on its own. Fixed remaining problems and finished the application.