public class DateField extends Object
Date
<-> String
conversions in
a way that the resulting String
is suitable for indexing and
sorting.Modifier and Type | Field and Description |
---|---|
static String |
MAX_DATE_STRING
Returns 'zzzzzzzzz' -> something around 3189
|
static String |
MIN_DATE_STRING
Returns '000000000' -> something around 30 BC
|
Modifier and Type | Method and Description |
---|---|
static String |
dateToString(Date date)
Converts a Date to a string suitable for indexing.
|
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.
|
public static final String MIN_DATE_STRING
public static final String MAX_DATE_STRING
public static String dateToString(Date date)
public static String timeToString(long time)
IllegalArgumentException
- if the given time
is not
within the supported date range.public static long stringToTime(String s)
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.