public class DateInfo extends Object implements Cloneable, Serializable
DateInfo
class represents the days elapsed since January 1, 4713 B.C.Constructor and Description |
---|
DateInfo()
construct an empty DateInfo object
|
DateInfo(int num_of_days)
Construct a DateInfo object using the Julian day, which is the number of days that have elapsed since January 1,
4713 B.C.
|
DateInfo(int year,
int month,
int day)
Construct a DateInfo with the year, month and day info provided
|
DateInfo(String num_of_days)
Construct a DateInfo object using the string representation of the number of days since January 1, 4713 B.C.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Clone implementation that returns an Object with data cloned from self.
|
static int |
dateToJulianDate(int year,
int month,
int day)
convert the given year, month and day info into Julian Date
|
static int |
dateToJulianDate(String pattern,
String date_str)
convert the given date string into Julian Date
|
boolean |
equals(Object obj)
Use this method for checking equality between the current object and the provided one.
|
GregorianCalendar |
GetDate()
Return GregorianCalendar date for the current DateInfo object.
|
int |
getValue()
Returns the number of days since January 1, 4713 B.C.
|
int |
hashCode()
Returns the hash code value for this instance of the current class.
|
void |
setDate(int year,
int month,
int day)
Set the date with the year, month and day info provided
|
void |
setValue(DateInfo dt)
Sets the date using the given DateInfo object.
|
void |
setValue(int num_of_days)
Sets the number of days since January 1, 4713 B.C.
|
String |
toString()
Returns a string description of the object.
|
boolean |
validateDate()
Checks whether this date is a valid date or not.
|
public DateInfo()
public DateInfo(int num_of_days)
num_of_days
- public DateInfo(String num_of_days)
num_of_days
- public DateInfo(int year, int month, int day)
year
- the yearmonth
- the monthday
- the daypublic void setValue(int num_of_days)
public void setValue(DateInfo dt)
public int getValue()
public boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public String toString()
public GregorianCalendar GetDate()
public void setDate(int year, int month, int day)
public boolean validateDate()
public static int dateToJulianDate(int year, int month, int day)
year
- the yearmonth
- the monthday
- the daypublic static int dateToJulianDate(String pattern, String date_str) throws ARException
pattern
- the pattern describing the date formatdate_str
- the date string in the pattern specified aboveARException
public int hashCode()
? Copyright 2013 BMC Software, Inc.