Page Summary
-
DateTimeEntity is a class that extracts and provides estimated date-time values from text.
-
It includes a nested class, DateTimeGranularity, to define the precision of the extracted timestamp.
-
Various granularity constants are available, ranging from year to second.
-
Public methods allow retrieval of the timestamp in milliseconds and its corresponding granularity.
A date-time entity extracted from a piece of text. It provides estimated values for the date-time expressed in the text.
Nested Class Summary
Constant Summary
| int | GRANULARITY_DAY | * |
| int | GRANULARITY_HOUR | * |
|---|---|---|
| int | GRANULARITY_MINUTE | * |
| int | GRANULARITY_MONTH | * |
| int | GRANULARITY_SECOND | * |
| int | GRANULARITY_WEEK | * |
| int | GRANULARITY_YEAR | * |
Inherited Constant Summary
Public Method Summary
| int | |
| long | getTimestampMillis
()
The timestamp in milliseconds from the epoch of 1970-01-01T00:00:00Z (UTC
timezone).
|
Inherited Method Summary
Constants
public static final int GRANULARITY_DAY
public static final int GRANULARITY_HOUR
public static final int GRANULARITY_MINUTE
public static final int GRANULARITY_MONTH
public static final int GRANULARITY_SECOND
public static final int GRANULARITY_WEEK
public static final int GRANULARITY_YEAR
Public Methods
public int getDateTimeGranularity ()
Returns granularity (e.g. GRANULARITY_DAY
) for the timestamp returned by getTimestampMillis()
.
public long getTimestampMillis ()
The timestamp in milliseconds from the epoch of 1970-01-01T00:00:00Z (UTC timezone).


