com.lucene.document
Class DateField
java.lang.Object
|
+--com.lucene.document.DateField
- public class DateField
- extends Object
Provides support for converting dates to strings and vice-versa. The
strings are structured so that lexicographic sorting orders by date. This
makes them suitable for use as field values and search terms.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MIN_DATE_STRING
public static String MIN_DATE_STRING()
MAX_DATE_STRING
public static String MAX_DATE_STRING()
dateToString
public static String dateToString(Date date)
- Converts a Date to a string suitable for indexing.
timeToString
public static String timeToString(long time)
- Converts a millisecond time to a string suitable for indexing.
stringToTime
public static long stringToTime(String s)
- Converts a string-encoded date into a millisecond time.
stringToDate
public static Date stringToDate(String s)
- Converts a string-encoded date into a Date object.