public Date(String date,String dateFormat){
  if ((date == null) || (date.length() == 0)) {
    return;
  }
  if (dateFormat == null) {
    m_format=DATE_TIME_FORMAT;
    if (date.length() == LEN_STRING_IN_DATE_FORMAT) {
      m_format=DATE_FORMAT;
    }
  }
 else {
    m_format=dateFormat;
  }
  if ((m_format.equals(DATE_TIME_FORMAT) && !rightLengthForDateTime(date)) || (m_format.equals(DATE_FORMAT) && (date.length() != LEN_STRING_IN_DATE_FORMAT))) {
    m_invalidDate=date;
  }
 else {
    m_date=TradingCalendar.getZonedDateTimeFromDateTimeString(date.trim(),m_format);
    m_invalidDate=null;
  }
}

public Date ( String date , String dateFormat ) { if ( ( date == null ) || ( date . length ( ) == 0 ) ) { return ; } if ( dateFormat == null ) { m_format = DATE_TIME_FORMAT ; if ( date . length ( ) == LEN_STRING_IN_DATE_FORMAT ) { m_format = DATE_FORMAT ; } } else { m_format = dateFormat ; } if ( ( m_format . equals ( DATE_TIME_FORMAT ) && ! rightLengthForDateTime ( date ) ) || ( m_format . equals ( DATE_FORMAT ) && ( date . length ( ) != LEN_STRING_IN_DATE_FORMAT ) ) ) { m_invalidDate = date ; } else { m_date = TradingCalendar . getZonedDateTimeFromDateTimeString ( date . trim ( ) , m_format ) ; m_invalidDate = null ; } }
parse the string field date using the incoming date form
