|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Date
com.silverpeas.calendar.AbstractDateDatable<Date>
com.silverpeas.calendar.Date
public class Date
A date on a day of a month and in year. The time isn't represented here. Please refers to DateTime to models also the time.
Field Summary |
---|
Fields inherited from interface com.silverpeas.calendar.Datable |
---|
ICAL_PATTERN, ICAL_UTC_PATTERN, ISO_8601_PATTERN, SHORT_ISO_8601_PATTERN |
Constructor Summary | |
---|---|
Date(Date aDate)
Constructs a new date from the specified Java date. |
Method Summary | |
---|---|
Date |
asDate()
Gets the java Date representation of this datable. |
Date |
clone()
Clones itself. |
static Date |
dateOn(int year,
int month,
int dayOfMonth)
Creates a date on the specified year in the specified month (1 to 12) and in the specified day (1 to 31). |
boolean |
equals(Object obj)
|
TimeZone |
getTimeZone()
The time zone has no meaning for a date. |
int |
hashCode()
|
Date |
inTimeZone(TimeZone timeZone)
The time zone for a date has no meaning. |
boolean |
isAfter(Date anotherDatable)
Is this datable strictly after in time the specified another one? |
boolean |
isBefore(Date anotherDatable)
Is this datable strictly before in time the specified another one? |
boolean |
isEqualTo(Date anotherDatable)
Is this datable equal in time to the specified another one? |
protected Date |
newInstanceFrom(Date aDate)
Create a new instance from a given date time in milliseconds. |
Date |
next()
The next date to this one. |
Date |
previous()
The previous date to this one. |
static Date |
today()
Creates a date set to today. |
String |
toICal()
Gets the ISO 8601 textual representation of this date as it is in the iCal specification. |
String |
toICalInUTC()
Gets the ISO 8601 textual representation of this date as it is in the iCal specification. |
String |
toISO8601()
Gets an ISO 8601 textual representation of this datable by taking into account of its underlying timezone. |
static Date |
tomorrow()
Creates a date set to tomorrow. |
String |
toShortISO8601()
Gets an ISO 8601 textual representation of this datable by taking into account of its underlying timezone. |
static Date |
yesterday()
Creates a date set to yesterday. |
Methods inherited from class com.silverpeas.calendar.AbstractDateDatable |
---|
addDays, addHours, addMilliseconds, addMinutes, addMonths, addSeconds, addWeeks, addYears, getBeginOfDay, getBeginOfMonth, getBeginOfWeek, getBeginOfWeek, getBeginOfYear, getEndOfDay, getEndOfMonth, getEndOfWeek, getEndOfWeek, getEndOfYear, getTimeDataTo, isDefined, isNotDefined |
Methods inherited from class java.util.Date |
---|
after, before, compareTo, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toLocaleString, toString, UTC |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Date(Date aDate)
aDate
- the Java date from which this Silverpeas date is built.Method Detail |
---|
public static Date today()
public static Date tomorrow()
public static Date yesterday()
public static Date dateOn(int year, int month, int dayOfMonth)
year
- the year.month
- the month (1 for january, 12 for december).dayOfMonth
- the day of month: 1 to 28,29,30,31 according to the month.
protected Date newInstanceFrom(Date aDate)
AbstractDateDatable
newInstanceFrom
in class AbstractDateDatable<Date>
aDate
- the date time in milliseconds.
public Date clone()
Datable
clone
in interface Datable<Date>
clone
in class AbstractDateDatable<Date>
public Date asDate()
Datable
public Date inTimeZone(TimeZone timeZone)
timeZone
- the time zone to set to this date.?
public String toISO8601()
Datable
public String toShortISO8601()
Datable
public String toICal()
Datable
public String toICalInUTC()
Datable
public TimeZone getTimeZone()
public Date next()
public Date previous()
public boolean isBefore(Date anotherDatable)
Datable
anotherDatable
- the another datable to which this is compared.
public boolean isAfter(Date anotherDatable)
Datable
anotherDatable
- the another datable to which this is compared.
public boolean isEqualTo(Date anotherDatable)
Datable
anotherDatable
- the another datable to which this is compared.
public boolean equals(Object obj)
equals
in class Date
public int hashCode()
hashCode
in class Date
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |