It seems likely that one of the parameters you think is an integer isn't in fact an integer. If you want more than that you'll have to tell us where the error happens.
Edit: ah, there you go. What's the value of the day parameter?
Basic debugging step #1, what is the value returned by the call to getParameter()? That's something that should be checked long before you post the problem to a forum.