|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.timeindexing.time.TimeDateParser
public class TimeDateParser
Parses a time or date from a given input.
| Field Summary | |
|---|---|
protected DateParser |
dayFormat
|
protected DateParser |
dmyFormat
|
protected DateParser |
dmyFullestFormat
|
protected DateParser |
dmyFullFormat
|
protected DateParser |
fullestFormat
|
protected DateParser |
fullestFormatNS
|
protected DateParser |
fullFormat
|
protected DateParser |
fullFormatNS
|
protected DateParser |
hourFormat
|
protected DateParser |
secondFormat
|
protected 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 DateParser fullestFormat
protected DateParser dmyFullestFormat
protected DateParser fullestFormatNS
protected DateParser fullFormat
protected DateParser dmyFullFormat
protected DateParser fullFormatNS
protected DateParser ymdFormat
protected DateParser dmyFormat
protected DateParser dayFormat
protected DateParser hourFormat
protected 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:
timeArg - the input stringabsolute - 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.
timeArg - the input stringabsolute - should the timestamp be parsed as an absolute
time or a relative time.parseFormat - the parse format to use when trying to parse timeStr.
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 | ||||||||