public class DateTime8601
extends java.lang.Object
Constructor and Description |
---|
DateTime8601(java.util.Date date)
Construct a DateTime8601 from a Date
|
DateTime8601(java.lang.String stringFormat8601)
create a DateTime8601 from a string representation
YYYY-MM-DDThh:mm:ss:SSZ
|
Modifier and Type | Method and Description |
---|---|
DateTime8601 |
addTime(int seconds)
Returns a new DateTime8601 that is based on
it's time + 'number of seconds' provided
|
boolean |
after(DateTime8601 dateTime) |
boolean |
before(DateTime8601 dateTime)
Returns a boolean indicating if this date is before the specified date
|
static java.util.Date |
createDate(java.lang.String stringFormat8601)
Create a Date object from an ISO8601 String
|
boolean |
equals(DateTime8601 dateTime) |
boolean |
equals(java.lang.Object obj)
This version of equals() overrides Object.equals().
|
static java.lang.String |
formatDate(java.util.Date date)
Return an ISO8601 String representation for a Date object
|
static DateTime8601 |
getCurrentTime()
Create a DateTime8601 based on the current time
|
int |
hashCode()
Returns a hash code value for this date object
|
void |
setTime(java.lang.String stringFormat8601)
Replaces the time value of this object
|
java.util.Date |
toDate()
Returns a Date object from this DateTime8601 object
|
java.lang.String |
toString()
Returns an ISO8601 String representation of this DateTime8601 object
CCYY-MM-DDThh:mm:ss:ssZ
|
void |
update()
Updates this DataTime object with the current data/time
|
public DateTime8601(java.lang.String stringFormat8601)
java.lang.IllegalArgumentException
- if the specified string fails to parse as a datepublic DateTime8601(java.util.Date date)
public void setTime(java.lang.String stringFormat8601)
stringFormat8601
- String representation of the new date valuejava.lang.IllegalArgumentException
- if the specified string fails to parse as a datepublic static java.lang.String formatDate(java.util.Date date)
public static java.util.Date createDate(java.lang.String stringFormat8601) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static DateTime8601 getCurrentTime()
public void update()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Date toDate()
public DateTime8601 addTime(int seconds)
public boolean before(DateTime8601 dateTime)
dateTime
- the date to compare this value topublic boolean after(DateTime8601 dateTime)
public boolean equals(DateTime8601 dateTime)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object