try {
if (input == null || input.length() == 0) return false;
DateTimeFormatter parser = ISODateTimeFormat.dateTimeNoMillis();
parser.parseDateTime(input);
} catch (IllegalArgumentException iae) {
return false;
} catch (ClassCastException e) {
return false;
}
return true;
}
No comments:
Post a Comment