Do you know Java? It has comprehensive data handling classes as part of the every installation. Suggesting installing a database or another language to process dates in the Java forum is just silly. Plus it's obvious that the OP has been set the task of trying to code that functionality for himself.
DaniWeb Member Rules (which you agreed to when you signed up) include:
Do ensure that all posts contain relevant content and substance and are not simply vehicles for external links
Normally a post like yours would get deleted, and repetition would lead to an infraction, but as this is your first post we'll write it off as a learning experience.
I need clarification on "repetition:"
1. repetition of the answer to the same question;
2. repetition of the content of answers to other questions. As an example, I don't know Java; did you comment because of this?
3. I was not being facetious. I'm 70, and what I don't know about OO would fill volumes.
4. I've written this exact function in S/370 assembler, therefore the leap year comment.
Your post violated the DaniWeb ruleDo ensure that all posts contain relevant content and substance and are not simply vehicles for external links
because your content was irrelevant and just referred to (irrelevant) external links.
Now that you are aware of that, you may be penalised for violating DaniWeb rules in future.
If you don't know Java then it's unlikely that you will have much to contribute in a Java forum. Maybe you could be more at home in the Database or PHP forums?
I apologize for becoming "off topic." But I'm new and don't know where to go for answers.
I didn't see/know that this is a Java forum. Had I seen that I wouldn't have even tried to answer the question.
untio's answer taught me something about Java. Thanks, untio.
I need an answer to my "repetition" question? This is important because it affects my future answers to questions in an appropriate forum.
Is there somewhere I can get clarification of the rules? Perhaps an "answer review" forum for new posters?
OK, don't worry. If you stick to giving relevant answers you are unlikely to get into any trouble. Here's the complete set of Community rules, for future reference. If you have any questions you can PM any Moderator or Administrator.
Anyway, let's just treat this as part of the learning process. You have not been penalised in any way, nor given any "black marks". Your slate is clean. Enjoy DaniWeb.
I did have the java.util.Date & java.util.GregorianCalendar pkgs in mind, however in reading the Java API i understood that methods in the Date class were deprecated and that the calendar class should be used instead.