Ti Ru wrote:Basically what i am trying to figure out is how to make required user input in the format, mm / dd / yyyy with spaces before and after the dashes.
That code assumes there will be no spaces around the slashes (not dashes).
So if you want the user to enter spaces then you need to change lines 32 - 44 of your code.
The length of the line will no longer be 10 and you will have to check for spaces either side of where you currently set the values of symbol and symbol2.
Having said all that, you would actually be better off looking at the SimpleDateFormat class which will do all of this for you.
Welcome to the Ranch and well done finding the code button. But your indentation is inconsistent and you have too many blank lines. We have some suggestions about indentation, etc. You will find more help if you look at the first and second links in this previous post.
I shall see if I can improve your indentation, as well as breaking the longer lines, so you can see the way to do it.
I have tried to improve the indentation.
Why are all your methods static? You should create a field for date (or day month year) and use non‑static methods.
Don't call the Birthday method so often. Make the check method return a boolean for valid date, and you can then call the method once in a loop. The methods should be called birthday and check, by the way.