Please post your code inside of the code tags( [ code] and [ /code] without the space)
Well, the getNextDay() function isn't working, and when I ran it the program crashed on getPrevDay() with an access violation.
in the function getNextDay() you have a simple logic error, you have as the else for the if() to set it equal to sunday, now, when you find a match and set it to the index+1 you should probably return that value from inside of the for loop instead of it getting over-written by the else on the next iteration of the loop.
Same problem with getPrevDay()
except with getPrevDay you also create an access violation starting at x=7 instead instead of x=6, which is the actual end of the array, and you want to loop while x > (-1) instead of x is greater than 0. 0 is a valid index.
also I will suggest that you use the curly braces '{' and '}' for those two for loops because it makes the code clearer.