public class DTBuilder
extends java.lang.Object
DateValues and
DateTimeValues.| Modifier and Type | Field and Description |
|---|---|
int |
day
one indexed
|
int |
hour
zero indexed in 24 hour time.
|
int |
minute
zero indexed
|
int |
month
one indexed.
|
int |
second
zero indexed
|
int |
year
in AD.
|
| Constructor and Description |
|---|
DTBuilder(DateValue dv) |
DTBuilder(int year,
int month,
int day) |
DTBuilder(int year,
int month,
int day,
int hour,
int minute,
int second) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(DateValue dv)
behavior undefined unless normalized.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
void |
normalize()
makes sure that the fields are in the proper ranges, by e.g.
|
DateValue |
toDate()
produces a normalized date.
|
DateTimeValue |
toDateTime()
produces a normalized date time, using zero for the time fields if none
were provided.
|
java.lang.String |
toString() |
public int year
public int month
public int day
public int hour
public int minute
public int second
public DTBuilder(int year,
int month,
int day,
int hour,
int minute,
int second)
public DTBuilder(int year,
int month,
int day)
public DTBuilder(DateValue dv)
public DateTimeValue toDateTime()
public DateValue toDate()
public int compareTo(DateValue dv)
toDateValue().compareTo(dv) instead.public void normalize()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object