public class DateType
extends java.lang.Object
| Constructor and Description |
|---|
DateType()
no argument constructor for beans
|
DateType(boolean isPresent,
java.util.Date date)
Constructor using a java.util.Date
|
DateType(DateType src)
copy constructor
|
DateType(java.lang.String text,
java.lang.String format,
java.lang.String type)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
DateType |
add(TimeDuration d) |
DateType |
add(TimeUnit d) |
boolean |
after(java.util.Date d)
Is this date after the given date.
|
boolean |
before(java.util.Date d)
Is this date before the given date.
|
boolean |
before(DateType d)
Is this date before the given date.
|
boolean |
equals(java.lang.Object o) |
java.util.Date |
getDate()
Get this as a Date
|
java.lang.String |
getFormat()
Get the SimpleDateFormat format for parsing the text.
|
java.lang.String |
getText()
Get a text representation.
|
java.lang.String |
getType()
Get the type of Date.
|
int |
hashCode() |
static java.lang.String |
hiddenProperties()
For bean editing, public by accident.
|
boolean |
isBlank()
Was blank text passed to the constructor.
|
boolean |
isPresent()
Does this represent the present time.
|
static void |
main(java.lang.String[] args)
test
|
void |
setDate(java.util.Date date)
Set the Date.
|
void |
setType(java.lang.String type)
Set the type of Date.
|
DateType |
subtract(TimeDuration d) |
DateType |
subtract(TimeUnit d) |
java.lang.String |
toDateString()
Same as DateFormatter.toDateOnlyString()
|
java.lang.String |
toDateTimeString()
Same as DateFormatter.toDateTimeString()
|
java.lang.String |
toDateTimeStringISO()
Same as DateFormatter.toDateTimeStringISO()
|
java.lang.String |
toString()
String representation
|
public DateType(boolean isPresent,
java.util.Date date)
isPresent - if true, this represents the "present time"date - the given datepublic DateType()
public DateType(DateType src)
src - copy from herepublic DateType(java.lang.String text,
java.lang.String format,
java.lang.String type)
throws java.text.ParseException
text - string representationformat - using java.text.SimpleDateFormat, or nulltype - type of date, or nulljava.text.ParseException - if error parsing textpublic static java.lang.String hiddenProperties()
public java.util.Date getDate()
public void setDate(java.util.Date date)
date - set to this Datepublic boolean isPresent()
public boolean isBlank()
public java.lang.String getText()
public java.lang.String getFormat()
public java.lang.String getType()
public void setType(java.lang.String type)
type - type of Datepublic boolean before(java.util.Date d)
d - test against this datepublic boolean before(DateType d)
d - test against this datepublic boolean after(java.util.Date d)
d - test against this datepublic java.lang.String toDateString()
public java.lang.String toDateTimeString()
public java.lang.String toDateTimeStringISO()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic DateType add(TimeDuration d)
public DateType subtract(TimeDuration d)
public static void main(java.lang.String[] args)