|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.document.DateField
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.
Note: currenly dates before 1970 cannot be used, and therefore cannot be indexed.
Method Summary | |
static String |
dateToString(Date date)
Converts a Date to a string suitable for indexing. |
static String |
MAX_DATE_STRING()
|
static String |
MIN_DATE_STRING()
|
static Date |
stringToDate(String s)
Converts a string-encoded date into a Date object. |
static long |
stringToTime(String s)
Converts a string-encoded date into a millisecond time. |
static String |
timeToString(long time)
Converts a millisecond time to a string suitable for indexing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static String MIN_DATE_STRING()
public static String MAX_DATE_STRING()
public static String dateToString(Date date)
public static String timeToString(long time)
public static long stringToTime(String s)
public static Date stringToDate(String s)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |