Does anyone know of a class or library that does "smart" date
parsing ("guessing" would be a better word)?
What I did was to have an array of java.text.SimpleDateFormat where
each array element contained a different possible pattern of a date.
I then iterated over the array until one parsed successfully, i.e.:
for ( SimpleDateFormat format : dateFormats )
try {
return format.parse( s );
}
catch ( ParseException e ) {
// ignore
}
throw new IllegalArgumentException();
- Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden