List of usage examples for org.jfree.data.time Day DATE_FORMAT
DateFormat DATE_FORMAT
To view the source code for org.jfree.data.time Day DATE_FORMAT.
Click Source Link
From source file:org.jfree.data.time.Day.java
/** * Parses the string argument as a day.//from w w w.j ava 2s . c o m * <P> * This method is required to recognise YYYY-MM-DD as a valid format. * Anything else, for now, is a bonus. * * @param s the date string to parse. * * @return <code>null</code> if the string does not contain any parseable * string, the day otherwise. */ public static Day parseDay(String s) { try { return new Day(Day.DATE_FORMAT.parse(s)); } catch (ParseException e1) { try { return new Day(Day.DATE_FORMAT_SHORT.parse(s)); } catch (ParseException e2) { // ignore } } return null; }