lucene/src/main/java/com/orientechnologies/lucene/builder/OLuceneDateTools.java
public static Date stringToDate(String dateString) throws ParseException {
    try {
      SimpleDateFormat format = RESOLUTIONS[dateString.length()].format();
      return format.parse(dateString);
    } catch (Exception e) {
      OLogManager.instance().error(OLuceneDateTools.class, "Exception is suppressed, original exception is ", e);

      //noinspection ThrowInsideCatchBlockWhichIgnoresCaughtException
      throw new ParseException("Input is not a valid date string: " + dateString, 0);
    }
  }
public static Date stringToDate(String dateString) throws ParseException {
    try {
      SimpleDateFormat format = RESOLUTIONS[dateString.length()].format();
      return format.parse(dateString);
    } catch (Exception e) {
      OLogManager.instance().error(OLuceneDateTools.class, "Exception is suppressed, original exception is ", e);

      //noinspection ThrowInsideCatchBlockWhichIgnoresCaughtException
      throw new ParseException("Input is not a valid date string: " + dateString, 0);
    }
  }
public static Date stringToDate ( String dateString ) throws ParseException { try { SimpleDateFormat format = RESOLUTIONS [ dateString . length ( ) ] . format ( ) ; return format . parse ( dateString ) ; } catch ( Exception e ) { OLogManager . instance ( ) . error ( OLuceneDateTools . class , "Exception is suppressed, original exception is " , e ) ; //noinspection ThrowInsideCatchBlockWhichIgnoresCaughtException throw new ParseException ( "Input is not a valid date string: " + dateString , 0 ) ; } }
Converts a string produced by <code>timeToString</code> or
<code>dateToString</code> back to a time, represented as a
Date object.

@param dateString the date string to be converted

@return the parsed time as a Date object

@throws ParseException if <code>dateString</code> is not in the expected format
Converts a string produced by <code > timeToString< / code > or <code > dateToString< / code > back to a time represented as a Date object .