public interface RelativeInstant extends Instant, Cloneable
A relative instant is defined like an instant in the datetime continuum specified as a number of milliseconds from 1970-01-01T00:00Z. This definition of milliseconds is consistent with that of the JDK in Date or Calendar.
It contains also a Chronology which determines how the millisecond
instant value is converted into the date time fields. The default Chronology
can be set using the TimeSupportManager
class. (e.g: 1st January 2010)
A huge part of the documentation of this class has been retrieved from the joda-time library.
http://joda-time.sourceforge.net
,
https://gvsig.org/web/projects/gvsig-desktop/docs/devel/org-gvsig-sensors/1-0.0/analysis-and-design/detailed-view/time-support/libraries/org-gvsig-timesupport-lib
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Instant instant)
Compares this object with the specified object for ascending
millisecond instant order.
|
int |
getDayOfMonth()
Get the day of month field value.
|
EditableRelativeInstant |
getEditableCopy()
Get an editable copy used to edit other instance of
a relative instant.
|
int |
getHourOfDay()
Get the hour of day field value.
|
int |
getMillisOfSecond()
Get the millis of second field value.
|
int |
getMinuteOfDay()
Get the minute of day field value.
|
int |
getMinuteOfHour()
Get the minute of hour field value.
|
int |
getMonthOfYear()
Get the month of year field value.
|
int |
getSecondOfDay()
Get the second of day field value.
|
int |
getSecondOfMinute()
Get the second of minute field value.
|
int |
getYear()
Get the year field value.
|
java.util.Date |
toDate()
Get the date time as a
java.util.Date . |
long |
toMillis()
Gets the milliseconds of the datetime instant from the Java epoch
of 1970-01-01T00:00:00Z.
|
getChronology, intersects, isAbsolute, isInstant, isInterval, isRelative
clone, cloneQuietly, cloneQuietly
java.util.Date toDate()
java.util.Date
.
The Date
object created has exactly the same millisecond
instant as this object.
int compareTo(Instant instant)
instant
- a readable instant to check againstlong toMillis()
int getYear()
int getMonthOfYear()
int getDayOfMonth()
int getHourOfDay()
int getMinuteOfDay()
int getMinuteOfHour()
int getSecondOfDay()
int getSecondOfMinute()
int getMillisOfSecond()
EditableRelativeInstant getEditableCopy()