This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Someone is going to inevitably mention this, so it might as well be me: why not just use (Simple)DateFormat?
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Joined: Oct 28, 2011
I'm planning to write generic class to validate any date format and DATE_PATTERN regex will be passed to validate method based on date format.
By using DateFormat, if parse (date format yyyymmdd) I will get but which is wrong date(month is wrong).