|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.cle.util.SimpleDate
Simple storage class that represents a point in time.
We should eventually add methods such as "minutesSince(aSimpleDate)", etc...
Field Summary | |
static int |
FORMAT_DMONY
|
static int |
FORMAT_HMS
|
static int |
FORMAT_MDY
|
static int |
FORMAT_MONDY
|
static int |
FORMAT_YMD
|
static int |
FORMAT_YMDHMS
|
Constructor Summary | |
SimpleDate()
|
|
SimpleDate(java.util.Date aDate)
|
|
SimpleDate(int aYear,
int aMonth,
int aDay)
|
|
SimpleDate(int aYear,
int aMonth,
int aDay,
int anHour,
int aMinute,
int aSecond)
|
|
SimpleDate(SimpleDate aSimpleDate)
|
|
SimpleDate(java.lang.String aString,
int aFormatOption)
|
Method Summary | |
static java.lang.String |
dateTimeStamp()
|
static java.util.Date |
getCurrentDate()
Returns a new java.util.Date representing the current date and time |
static java.sql.Date |
getCurrentSQLDate()
|
int |
getDateDifference(int calUnit,
SimpleDate toDate)
|
static int |
getDateDifference(int calUnit,
SimpleDate fromDate,
SimpleDate toDate)
Gives the difference between the specifed dates in the unit specified by "calUnit". |
int |
getDay()
Access method for the month attribute. |
int |
getHour()
Access method for the hour attribute. |
static int |
getLastDayOfMonth(int month,
int year)
|
int |
getMinute()
Access method for the minute attribute. |
int |
getMonth()
Access method for the month attribute. |
int |
getSecond()
Access method for the second attribute. |
java.lang.String |
getStringMonth(int monthNo)
This method returns the month name string for a given month number. |
java.lang.String |
getSubStringMonth(int monthNo)
This method returns the month name sub string for a given month number. |
int |
getYear()
Access method for the year attribute. |
boolean |
isAfter(SimpleDate aSimpleDate)
|
boolean |
isBefore(SimpleDate aSimpleDate)
|
boolean |
isSame(SimpleDate aSimpleDate)
|
int |
julianDay()
Returns an int containing the Julian Day. |
static int |
julianDay(int aYear,
int aMonth,
int aDay)
Returns an int containing the Julian Day. |
static int[] |
julianToMonthDay(int year,
int jday)
Returns an array containing the month and day for the specified Julian Day (day of the year) and Year. |
boolean |
liesWithin(SimpleDate firstDate,
SimpleDate secondDate)
|
static void |
main(java.lang.String[] args)
A main to test functionality |
void |
setDay(int anInt)
Sets the day attribute to the specified int. |
void |
setHour(int anInt)
Sets the hour attribute to the specified int. |
void |
setMinute(int anInt)
Sets the minute attribute to the specified int. |
void |
setMonth(int anInt)
Sets the month attribute to the specified int. |
void |
setSecond(int anInt)
Sets the second attribute to the specified int. |
void |
setYear(int anInt)
Sets the year attribute to the specified int. |
static java.lang.String |
timeStamp()
|
java.util.Date |
toDate()
|
java.sql.Date |
toSqlDate()
|
java.lang.String |
toString(int aFormatOption)
|
long |
totalSeconds()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int FORMAT_YMD
public static final int FORMAT_HMS
public static final int FORMAT_YMDHMS
public static final int FORMAT_MDY
public static final int FORMAT_MONDY
public static final int FORMAT_DMONY
Constructor Detail |
public SimpleDate(int aYear, int aMonth, int aDay)
public SimpleDate(int aYear, int aMonth, int aDay, int anHour, int aMinute, int aSecond)
public SimpleDate(SimpleDate aSimpleDate)
public SimpleDate()
public SimpleDate(java.util.Date aDate)
public SimpleDate(java.lang.String aString, int aFormatOption)
Method Detail |
public static java.lang.String timeStamp()
public static java.lang.String dateTimeStamp()
public long totalSeconds()
public boolean isSame(SimpleDate aSimpleDate)
public boolean isBefore(SimpleDate aSimpleDate)
public boolean isAfter(SimpleDate aSimpleDate)
public boolean liesWithin(SimpleDate firstDate, SimpleDate secondDate)
public int getYear()
public int getMonth()
public int getDay()
public int getHour()
public int getMinute()
public int getSecond()
public void setYear(int anInt)
The
- new year attribute.public void setMonth(int anInt)
The
- new month attribute.public void setDay(int anInt)
The
- new day attribute.public void setHour(int anInt)
The
- new hour attribute.public void setMinute(int anInt)
The
- new minute attribute.public void setSecond(int anInt)
The
- new second attribute.public static java.util.Date getCurrentDate()
public static int[] julianToMonthDay(int year, int jday)
public static int julianDay(int aYear, int aMonth, int aDay)
public int julianDay()
public java.lang.String toString(int aFormatOption)
public java.lang.String getStringMonth(int monthNo)
public java.lang.String getSubStringMonth(int monthNo)
public static int getLastDayOfMonth(int month, int year)
public static int getDateDifference(int calUnit, SimpleDate fromDate, SimpleDate toDate) throws java.lang.Exception
public int getDateDifference(int calUnit, SimpleDate toDate) throws java.lang.Exception
public java.util.Date toDate()
public java.sql.Date toSqlDate()
public static java.sql.Date getCurrentSQLDate()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |