|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.ds.fw.types.FwSimpleObject
|
+--com.ds.fw.types.data.FwDate
| Field Summary | |
int |
_day
|
int |
_month
|
int |
_year
|
| 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 |
| Constructor Summary | |
FwDate()
Create a new Date with the default date of Jan 1st, FIRST YEAR. |
|
| Method Summary | |
int |
_getDate()
According to the source code this method always return 0 !!! |
void |
_setDate(int i)
A very useful method that do NOTHING (may be reserved for future use :)) |
void |
addDay()
Add a single day |
void |
addDays(int n)
Add a number of days to the date |
void |
addYears(int i)
Add a number of years |
void |
beLastDayOfMonth()
Sets the date to the last date of the month |
void |
beToday()
Sets the date to the current date (day, month and year) |
int |
compareTo(java.lang.Object o)
Compare two dates |
static com.ds.fw.types.data.FwDateIF |
createDate(java.util.Date d)
Create a date based on a java.util.Date. |
static com.ds.fw.types.data.FwDateIF |
createDate(int i)
Create a new date offset from today. |
static com.ds.fw.types.data.FwDateIF |
createDate(int m,
int d,
int y)
Create a new date from month, day, and year values. |
static com.ds.fw.types.data.FwDateIF |
createDate(java.lang.String s)
Set the date by parsing a string in the format mm/dd/ccyy. |
static com.ds.fw.types.data.FwDateIF |
createToday()
Create a date with today's date. |
static com.ds.fw.types.data.FwDateIF |
createTomorrow()
Create a date with tomorrow's date. |
static com.ds.fw.types.data.FwDateIF |
createYesterday()
Create a date with yesterday's date. |
boolean |
equals(java.lang.Object o)
Used to verify if two days are equals |
boolean |
fromString(java.lang.String s)
Set the date by parsing a string in the format mm/dd/ccyy. |
com.ds.fw.types.data.FwDateIF |
getDateCopy()
|
int |
getDay()
Gets the day |
int |
getDayOfWeek()
Gets the day of week (from 0 to 6) |
java.lang.String |
getDayOfWeekDisplayString()
Used to get the string which is displayed for a day of the week |
static java.lang.String |
getDayOfWeekDisplayString(int dow)
Used to get the string which is displayed for a day of the week |
int |
getDaysInMonth()
Gets the days in month , of the month , which is currently set |
static int |
getDaysInMonth(int m,
int y)
Used to find the number of the days in a month |
java.util.Date |
getJavaDate()
Gets the date as java.util.Date instance |
int |
getMonth()
Gets the month |
com.ds.fw.types.data.FwDateIF |
getNextDate()
Gets the next date |
com.ds.fw.types.data.FwDateIF |
getPreviousDate()
Gets the previous date |
static com.ds.fw.types.data.FwDateIF |
getToday()
Create a date with today's date. |
static com.ds.fw.types.data.FwDateIF |
getTomorrow()
Create a new date with tomorrow's date. |
int |
getYear()
Gets the year |
int |
hashCode()
Generate a hash code for the date |
boolean |
isAfter(com.ds.fw.types.data.FwDateIF d)
Verify if the date, given as argument is after |
boolean |
isBefore(com.ds.fw.types.data.FwDateIF d)
Verify if the date given as argument is before |
boolean |
isLastDayOfMonth()
Verify if this is the last date of month |
boolean |
isLeapYear()
Verify if the year is leap |
static boolean |
isLeapYear(int y)
Verify if the year given as parameter is a leap year |
boolean |
isOnOrAfter(com.ds.fw.types.data.FwDateIF d)
Verify if the date, given as argument is after or it is the same |
boolean |
isOnOrBefore(com.ds.fw.types.data.FwDateIF d)
Verify if the date given as argument is before or the same |
boolean |
isValid()
Verify if the date is valid |
static boolean |
isValidMonthDayYear(int m,
int d,
int y)
Check if a date is valid |
com.ds.fw.types.data.FwDateIF |
max(com.ds.fw.types.data.FwDateIF d)
Find the greater of two dates |
com.ds.fw.types.data.FwDateIF |
min(com.ds.fw.types.data.FwDateIF d)
Find the less of two dates |
static java.util.Calendar |
newCalendar()
|
static java.util.Calendar |
newCalendar(int y,
int m,
int d)
|
void |
set(int m,
int d,
int y)
Sets the day, month and the year with new values |
void |
setDate(com.ds.fw.types.data.FwDateIF d)
Sets the date - date, month and year |
void |
setDay(int o)
Sets the day |
void |
setJavaDate(java.util.Date d)
Sets the date |
void |
setMonth(int o)
Sets the month |
void |
setYear(int o)
Sets the year |
void |
subtractDay()
Substract a single day |
java.lang.String |
toStringValue()
Transform the date as String |
| Methods inherited from class com.ds.fw.types.FwSimpleObject |
getClassName, getClone, getCopy, getCopy, getDeepCopy, getDisplayString, getDisplayStringFor, postCopy, printStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.ds.fw.types.FwSimpleObjectIF |
getClassName, getClone, getCopy, getCopy, getDeepCopy, getDisplayString, getDisplayStringFor, postCopy, toString |
| Field Detail |
public int _day
public int _month
public int _year
| Constructor Detail |
public FwDate()
| Method Detail |
public static com.ds.fw.types.data.FwDateIF getToday()
createDate(int)public static com.ds.fw.types.data.FwDateIF getTomorrow()
createDate(int)public static com.ds.fw.types.data.FwDateIF createToday()
createDate(int)public static com.ds.fw.types.data.FwDateIF createTomorrow()
createDate(int)public static com.ds.fw.types.data.FwDateIF createYesterday()
createDate(int)public static com.ds.fw.types.data.FwDateIF createDate(int i)
public static com.ds.fw.types.data.FwDateIF createDate(java.util.Date d)
public static com.ds.fw.types.data.FwDateIF createDate(java.lang.String s)
public static com.ds.fw.types.data.FwDateIF createDate(int m,
int d,
int y)
public static java.lang.String getDayOfWeekDisplayString(int dow)
dow - - a number of a day of the week
FwDateConstantsIF
public static int getDaysInMonth(int m,
int y)
m - - the monthy - - the year
public static boolean isLeapYear(int y)
y - - the year
public static boolean isValidMonthDayYear(int m,
int d,
int y)
m - - monthd - - dayy - - year
public int getDay()
getDay in interface FwDateIFpublic void setDay(int o)
setDay in interface FwDateIFo - - the new daypublic int getMonth()
getMonth in interface FwDateIFpublic void setMonth(int o)
setMonth in interface FwDateIFo - - the new monthpublic int getYear()
getYear in interface FwDateIFpublic void setYear(int o)
setYear in interface FwDateIFo - - the new yearpublic void setDate(com.ds.fw.types.data.FwDateIF d)
setDate in interface FwDateIFd - public void beToday()
beToday in interface FwDateIFpublic void beLastDayOfMonth()
beLastDayOfMonth in interface FwDateIF
public void set(int m,
int d,
int y)
set in interface FwDateIFm - - the new dayd - - the new monthy - - the new yearpublic java.util.Date getJavaDate()
getJavaDate in interface FwDateIFpublic void setJavaDate(java.util.Date d)
setJavaDate in interface FwDateIFd - - a java.util.Date instancepublic int getDayOfWeek()
getDayOfWeek in interface FwDateIFFwDateConstantsIFpublic int getDaysInMonth()
public void addDays(int n)
addDays in interface FwDateIFn - - the number of the days , which we add(if n is positive) or substract(if is negative)public void addDay()
addDay in interface FwDateIFpublic void subtractDay()
subtractDay in interface FwDateIFpublic void addYears(int i)
addYears in interface FwDateIFi - - the number of the years we want to addpublic com.ds.fw.types.data.FwDateIF getNextDate()
getNextDate in interface FwDateIFpublic com.ds.fw.types.data.FwDateIF getPreviousDate()
getPreviousDate in interface FwDateIFpublic com.ds.fw.types.data.FwDateIF getDateCopy()
getDateCopy in interface FwDateIFpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableo - - the date to compare
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto -
public int hashCode()
hashCode in class java.lang.Objectpublic boolean isBefore(com.ds.fw.types.data.FwDateIF d)
isBefore in interface FwDateIFd - - the date which we compare
public boolean isOnOrBefore(com.ds.fw.types.data.FwDateIF d)
isOnOrBefore in interface FwDateIFd - - the date which we compare
public boolean isAfter(com.ds.fw.types.data.FwDateIF d)
isAfter in interface FwDateIFd - - the date which we compare
public boolean isOnOrAfter(com.ds.fw.types.data.FwDateIF d)
isOnOrAfter in interface FwDateIFd - - the date which we compare
public com.ds.fw.types.data.FwDateIF max(com.ds.fw.types.data.FwDateIF d)
max in interface FwDateIFd - - the date which we compare
public com.ds.fw.types.data.FwDateIF min(com.ds.fw.types.data.FwDateIF d)
min in interface FwDateIFd - - the date which we compare
public java.lang.String toStringValue()
toStringValue in interface FwSimpleObjectIFtoStringValue in class FwSimpleObjectpublic java.lang.String getDayOfWeekDisplayString()
getDayOfWeekDisplayString in interface FwDateIFpublic boolean fromString(java.lang.String s)
fromString in interface FwDateIFpublic boolean isValid()
isValid in interface FwDateIFpublic boolean isLeapYear()
isLeapYear in interface FwDateIFpublic boolean isLastDayOfMonth()
public static java.util.Calendar newCalendar()
public static java.util.Calendar newCalendar(int y,
int m,
int d)
public int _getDate()
_getDate in interface FwDateIFpublic void _setDate(int i)
_setDate in interface FwDateIFi -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||