|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.timeindexing.time.TimeDateParser
Parses a time or date from a given input.
Field Summary | |
protected static DateParser |
dayFormat
|
protected static DateParser |
fullestFormat
|
protected static DateParser |
fullFormat
|
protected static DateParser |
hourFormat
|
protected static DateParser |
secondFormat
|
protected static DateParser |
ymdFormat
|
Constructor Summary | |
TimeDateParser()
Construct a TimeDateParser. |
Method Summary | |
protected Timestamp |
createTimestamp(long seconds,
int subSeconds,
int subSecondLen,
boolean absolute)
Create a Timestamp given some seconds, some subSeconds, the length of the original subSecond string, and whether to create an absolute or relative Timestamp. |
Timestamp |
parse(java.lang.String timeArg,
boolean absolute)
Parse timestamps given as a String. |
Timestamp |
parse(java.lang.String timeArg,
boolean absolute,
java.lang.String parseFormat)
Parse timestamps given as a String. |
protected int |
parseSubseconds(java.lang.String subSecondStr)
Parse the subsecond part of a time String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static DateParser fullestFormat
protected static DateParser fullFormat
protected static DateParser ymdFormat
protected static DateParser dayFormat
protected static DateParser hourFormat
protected static DateParser secondFormat
Constructor Detail |
public TimeDateParser()
Method Detail |
public Timestamp parse(java.lang.String timeArg, boolean absolute)
The timestamps are of the format "time.subseconds" Formats processed for time are:
absolute
- should the timestamp be parsed as an absolute
time or a relative time.
public Timestamp parse(java.lang.String timeArg, boolean absolute, java.lang.String parseFormat)
The timestamps are of the format "time.subseconds" Formats processed for time are those supported by java.text.SimpleDateFormat.parse().
The returned Timestamp is at a resolution based on the resolution of the passed in string. Formats for subseconds can resolve down to nanoseconds. e.g. .2 is 2/10ths of a seconds, .200 is 200 milliseconds, .25000 is 25000 microseconds, and so on.
absolute
- should the timestamp be parsed as an absolute
time or a relative time.
protected int parseSubseconds(java.lang.String subSecondStr)
protected Timestamp createTimestamp(long seconds, int subSeconds, int subSecondLen, boolean absolute)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |