This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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).