public final class MIDate extends Object implements Comparable, Serializable
Month constants for month names to avoid confusion and increase readability.Month,
GregorianCalendar,
Serialized Form| Constructor and Description |
|---|
MIDate(Date date)
Constructs a new instance using from
java.util.date using joda api. |
MIDate(int year,
int month,
int day)
Constructs a new instance for the specified year, month, and day.
|
MIDate(long milliSeconds)
Constructs a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(MIDate date) |
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one.
|
int |
getDay()
Returns the day of the month.
|
int |
getMonth()
Returns the month.
|
long |
getTimeInMilliSeconds()
Returns the date as the number of milliseconds since the Epoch.
|
int |
getYear()
Returns the year.
|
int |
hashCode()
Returns a hash code value for the object.
|
MIDate |
minus(MITimespan timespan)
Returns an MIDate that is the result of subtracting the specified MITimespan from this MIDate.
|
MIDate |
plus(MITimespan timespan)
Returns an MIDate that is the result of adding the specified MITimespan to this MIDate.
|
String |
toString()
Returns the date in MM/DD/YY format.
|
public MIDate(int year,
int month,
int day)
year - the year (e.g. 1995)month - the month. Use the Month constants such as Month.FEBRUARY.day - the day of the month.public MIDate(long milliSeconds)
Calendar.getTimeInMillis()
or System.currentTimeMillis().milliSeconds - time in milliseconds to use to initialize this instance.public MIDate(Date date)
java.util.date using joda api.date - public long getTimeInMilliSeconds()
Calendarpublic int getYear()
public int getMonth()
Month class (for example, Month.JANUARY).public int getDay()
public boolean equals(Object o)
public int compareTo(MIDate date)
compareTo in interface Comparablepublic int hashCode()
public MIDate plus(MITimespan timespan)
timespan - The MITimespan to add to this MIDate.public MIDate minus(MITimespan timespan)
timespan - The MITimespan to subtract from this MIDate.© 2007, 2022 Precisely. All rights reserved.