Code example for DateFormat

Methods: parse

    private GregorianCalendar parse(String o1, DateFormat formatter) {
        try { 
            Date date = formatter.parse(o1);
            GregorianCalendar c = new GregorianCalendar();
            return c;
        } catch (java.text.ParseException e) {
            return null; 
    public void write(JSONWriter writer, Properties options)
    throws JSONException { 
        writer.key("description"); writer.value("Returns o converted to a date object, you can hint if the day or the month is listed first, or give an ordered list of possible formats using this syntax:");