Let me set some values to these variables for my example.
NoOfDays = 2;
curr = 5;
In your if statement, NoOfDays will increment to 3 then be set to 5.
In your else statement, NoOfDays will be...
Type: Posts; User: Chris.Brown.SPE
Let me set some values to these variables for my example.
NoOfDays = 2;
curr = 5;
In your if statement, NoOfDays will increment to 3 then be set to 5.
In your else statement, NoOfDays will be...
The imediate problem i'm seeing is that you're setting the NoOfStay to current after you increment it. Basically overwritting your increment.
if(toDate != inDate)
...
I'm not sure where to start. I cant really hammer down what is going on as it seems there is code missing. Can you post the whole class so i can see where all variables are being initialized? Maybe...