code: public CSLDate parse(String str) {
  		Map<String, Object> res;
  		try {
  			Map<String, Object> m = runner.callMethod(
  					parser, "parseDateToArray", Map.class, str);
  			res = m;
  		} catch (ScriptRunnerException e) {
  			throw new IllegalArgumentException("Could not update items", e);
  		}
  		
  		CSLDate r = CSLDate.fromJson(res);
  		if (r.getDateParts().length == 2 && Arrays.equals(r.getDateParts()[0], r.getDateParts()[1])) {
  			r = new CSLDateBuilder(r).dateParts(r.getDateParts()[0]).build();
  		}
  		return r;
  	}
docs: Parses a string to a date
  @param str the string to parse
  @return the parsed date