public static long[] parseDateTime(long val){
  if ((val != 0) && (val <= 100)) {
    throw new InvalidDateFormatException("date",Long.toString(val));
  }
  if (val < DATETIME_MONTH_SCALE) {
    val*=DATETIME_DATE_SCALE;
  }
  long[] dt=decodeDateTime(val);
  if (val != 0) {
    dt[YEAR_INDEX]=adjustTwoDigitYear(dt[YEAR_INDEX]);
  }
  if (!isValidDateTime_Zeros(dt)) {
    throw new InvalidDateFormatException("date",Long.toString(val));
  }
  if (!isValidHrMinSec(dt,true,true)) {
    throw new InvalidDateFormatException("datetime",Long.toString(val));
  }
  return dt;
}

public static long [ ] parseDateTime ( long val ) { if ( ( val != 0 ) && ( val <= 100 ) ) { throw new InvalidDateFormatException ( "date" , Long . toString ( val ) ) ; } if ( val < DATETIME_MONTH_SCALE ) { val *= DATETIME_DATE_SCALE ; } long [ ] dt = decodeDateTime ( val ) ; if ( val != 0 ) { dt [ YEAR_INDEX ] = adjustTwoDigitYear ( dt [ YEAR_INDEX ] ) ; } if ( ! isValidDateTime_Zeros ( dt ) ) { throw new InvalidDateFormatException ( "date" , Long . toString ( val ) ) ; } if ( ! isValidHrMinSec ( dt , true , true ) ) { throw new InvalidDateFormatException ( "datetime" , Long . toString ( val ) ) ; } return dt ; }
parse an * external * datetime long ( e . g . yyyymmddhhmmss = > 20130130 ) into a array .
