code: private static Date getShortDateOrNull(JSONObject obj, String field)
  			throws JSONException {
          final String dateStr = JsonInput.getStringOrNull(obj, field);
          if (dateStr == null) {
              return null;
          }
          final SimpleDateFormat dateFormat; 
          if (dateStr.length() >= 5 && dateStr.charAt(4) == '/')
              dateFormat = RedmineDateUtils.SHORT_DATE_FORMAT.get();
          else
              dateFormat = RedmineDateUtils.SHORT_DATE_FORMAT_V2.get();
  
          try {
              return dateFormat.parse(dateStr);
          } catch (ParseException e) {
              throw new JSONException("Bad date " + dateStr);
          }
  	}
docs: Fetches an optional date from an object.
  
  @param obj
  object to get a field from.
  @param field
  field to get a value from.
  @throws RedmineFormatException
  if value is not valid