|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
FwDate captures a calendar day. IE, some day represented in month, day, year format. In general no checking is done to ensure that the values set are valid. For instance, setMonthDayYear(40, 500, -17) will be accepted and will set the month, day and year values exactly as specified. The method, isValid() may be called to determine if a combination is valid. Valid dates cannot be created before Jan 1, 1800. See FwDate for more details. The format for day, month, and year are as follows: day 1-31, where 1 is the first day of the month month 0-11, where 0 is January year CCYY format
| Field Summary |
| Fields inherited from interface com.ds.fw.types.data.FwDateConstantsIF |
DOW_FRIDAY, DOW_MONDAY, DOW_SATURDAY, DOW_SUNDAY, DOW_THURSDAY, DOW_TUESDAY, DOW_WEDNESDAY, FIRST_DAY_OF_WEEK, FIRST_YEAR, GMT_TIME_ZONE_ID, LAST_YEAR |
| Method Summary | |
int |
_getDate()
|
void |
_setDate(int i)
|
void |
addDay()
Mutate my state so that I become the next calendar date. |
void |
addDays(int n)
Mutate my state so that I become n number of calendar days in the future or past. |
void |
addYears(int i)
Add i years to the current date. |
void |
beLastDayOfMonth()
Adjust the day value to be the last day of the month and year. |
void |
beToday()
Adjust the date to be today's date. |
boolean |
fromString(java.lang.String s)
Parse a string in the form of mm/dd/ccyy to set the date. |
com.ds.fw.types.data.FwDateIF |
getDateCopy()
|
int |
getDay()
Get the current day. |
int |
getDayOfWeek()
Get the day of week index. |
java.lang.String |
getDayOfWeekDisplayString()
Get a string that represents my day of week: "Sunday", "Monday", etc. |
java.util.Date |
getJavaDate()
Create a new instance of a java.util.Date using the values of day, month, and year. |
int |
getMonth()
Get the current month. |
com.ds.fw.types.data.FwDateIF |
getNextDate()
Create a new date and set its value to be the next day after my date. |
com.ds.fw.types.data.FwDateIF |
getPreviousDate()
Create a new date and set its value to be the previous date before by date. |
int |
getYear()
Get the current year. |
boolean |
isAfter(com.ds.fw.types.data.FwDateIF d)
Determine if my date is after d. |
boolean |
isBefore(com.ds.fw.types.data.FwDateIF d)
Determine if my date is before d. |
boolean |
isLeapYear()
Detemine if my year is a leap year. |
boolean |
isOnOrAfter(com.ds.fw.types.data.FwDateIF d)
Determine if my date is after d. |
boolean |
isOnOrBefore(com.ds.fw.types.data.FwDateIF d)
Determine if my date is before d. |
boolean |
isValid()
Determine if the current values of day, month, and year are valid both independently and in combination. |
com.ds.fw.types.data.FwDateIF |
max(com.ds.fw.types.data.FwDateIF d)
|
com.ds.fw.types.data.FwDateIF |
min(com.ds.fw.types.data.FwDateIF d)
|
void |
set(int m,
int d,
int y)
Set the month, day, and year values. |
void |
setDate(com.ds.fw.types.data.FwDateIF d)
Set the month, day, and year. |
void |
setDay(int i)
Set the current day |
void |
setJavaDate(java.util.Date d)
Set the day, month and year values based on the java.util.Date. |
void |
setMonth(int i)
Set the current month |
void |
setYear(int i)
Set the current year |
void |
subtractDay()
Mutate my state so that I become the previous calendar date. |
| Methods inherited from interface com.ds.fw.types.FwSimpleObjectIF |
getClassName, getClone, getCopy, getCopy, getDeepCopy, getDisplayString, getDisplayStringFor, postCopy, toString, toStringValue |
| Methods inherited from interface java.lang.Comparable |
compareTo |
| Method Detail |
public int getMonth()
public void setMonth(int i)
public int getDay()
public void setDay(int i)
public int getYear()
public void setYear(int i)
public void setDate(com.ds.fw.types.data.FwDateIF d)
public int getDayOfWeek()
FwDateConstantsIFpublic void addDay()
public void subtractDay()
public void addDays(int n)
public void addYears(int i)
public java.util.Date getJavaDate()
public void setJavaDate(java.util.Date d)
public void set(int m,
int d,
int y)
public void beLastDayOfMonth()
public void beToday()
public com.ds.fw.types.data.FwDateIF getNextDate()
public com.ds.fw.types.data.FwDateIF getPreviousDate()
public boolean isValid()
public boolean isBefore(com.ds.fw.types.data.FwDateIF d)
public boolean isOnOrBefore(com.ds.fw.types.data.FwDateIF d)
public boolean isAfter(com.ds.fw.types.data.FwDateIF d)
public boolean isOnOrAfter(com.ds.fw.types.data.FwDateIF d)
public boolean isLeapYear()
public java.lang.String getDayOfWeekDisplayString()
public boolean fromString(java.lang.String s)
public com.ds.fw.types.data.FwDateIF getDateCopy()
public com.ds.fw.types.data.FwDateIF max(com.ds.fw.types.data.FwDateIF d)
public com.ds.fw.types.data.FwDateIF min(com.ds.fw.types.data.FwDateIF d)
public int _getDate()
public void _setDate(int i)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||