Package org.silverpeas.core.date
Class Date
- java.lang.Object
-
- java.util.Date
-
- org.silverpeas.core.date.AbstractDateTemporal<Date>
-
- org.silverpeas.core.date.Date
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<Date>
,Temporal<Date>
@Deprecated public class Date extends AbstractDateTemporal<Date>
Deprecated.Use the java.time APIWARNING: All the deprecated classes in this package contain failure in their handling of date times (bad use of Timezone, etc.) 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.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.silverpeas.core.date.Temporal
ICAL_PATTERN, ICAL_UTC_PATTERN, ISO_8601_PATTERN, SHORT_ISO_8601_PATTERN
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Date
asDate()
Deprecated.Gets the java Date representation of this temporal.Date
clone()
Deprecated.Clones itself.static Date
dateOn(int year, int month, int dayOfMonth)
Deprecated.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)
Deprecated.TimeZone
getTimeZone()
Deprecated.The time zone has no meaning for a date.int
hashCode()
Deprecated.Date
inTimeZone(TimeZone timeZone)
Deprecated.The time zone for a date has no meaning.boolean
isAfter(Date anotherDatable)
Deprecated.Is this temporal strictly after in time the specified another one?boolean
isBefore(Date anotherDatable)
Deprecated.Is this temporal strictly before in time the specified another one?boolean
isEqualTo(Date anotherDatable)
Deprecated.Is this temporal equal in time to the specified another one?boolean
isTimeSupported()
Deprecated.Is this temporal supports the time unit?protected Date
newInstanceFrom(Date aDate)
Deprecated.Create a new instance from a given datetime in milliseconds.Date
next()
Deprecated.The next date to this one.Date
previous()
Deprecated.The previous date to this one.static Date
today()
Deprecated.Creates a date set to today.String
toICal()
Deprecated.Gets the ISO 8601 textual representation of this date as it is in the iCal specification.String
toICalInUTC()
Deprecated.Gets the ISO 8601 textual representation of this date as it is in the iCal specification.String
toISO8601()
Deprecated.Gets an ISO 8601 textual representation of this temporal by taking into account of its underlying timezone.LocalDate
toLocalDate()
Deprecated.Gets theLocalDate
representation of this Silverpeas date.static Date
tomorrow()
Deprecated.Creates a date set to tomorrow.String
toShortISO8601()
Deprecated.Gets an ISO 8601 textual representation of this temporal by taking into account of its underlying timezone.static Date
yesterday()
Deprecated.Creates a date set to yesterday.-
Methods inherited from class org.silverpeas.core.date.AbstractDateTemporal
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, from, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toInstant, toLocaleString, toString, UTC
-
-
-
-
Constructor Detail
-
Date
public Date(Date aDate)
Deprecated.Constructs a new date from the specified Java date.- Parameters:
aDate
- the Java date from which this Silverpeas date is built.
-
-
Method Detail
-
today
public static Date today()
Deprecated.Creates a date set to today.- Returns:
- today date.
-
tomorrow
public static Date tomorrow()
Deprecated.Creates a date set to tomorrow.- Returns:
- tomorrow date.
-
yesterday
public static Date yesterday()
Deprecated.Creates a date set to yesterday.- Returns:
- yesterday date.
-
dateOn
public static Date dateOn(int year, int month, int dayOfMonth)
Deprecated.Creates a date on the specified year in the specified month (1 to 12) and in the specified day (1 to 31).- Parameters:
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.- Returns:
- the date corresponding to the specified date information.
-
newInstanceFrom
protected Date newInstanceFrom(Date aDate)
Deprecated.Description copied from class:AbstractDateTemporal
Create a new instance from a given datetime in milliseconds.- Specified by:
newInstanceFrom
in classAbstractDateTemporal<Date>
- Parameters:
aDate
- the datetime in milliseconds.- Returns:
- the new temporal instance corresponding to the given time in milliseconds.
-
asDate
public Date asDate()
Deprecated.Description copied from interface:Temporal
Gets the java Date representation of this temporal.- Returns:
- a Date representation of this temporal.
-
inTimeZone
public Date inTimeZone(TimeZone timeZone)
Deprecated.The time zone for a date has no meaning.- Parameters:
timeZone
- the time zone to set to this date.?- Returns:
- itself.
-
toISO8601
public String toISO8601()
Deprecated.Description copied from interface:Temporal
Gets an ISO 8601 textual representation of this temporal by taking into account of its underlying timezone. For datetime, the representation is at the accuracy to the second. The ISO 8601 format in which the date is returned is one of the more common in the Web, that is with the datetime separators (the hyphen for dates and the double-points for times): yyyy-MM-dd'T'HH:mm:ss where yyyy means the year in 4 digits, MM means the month in year in two digits, dd means the day in month in two digits, HH means the hour (24-o'clock) in two digits, mm means the minute in two digits, and ss the second in two digits.- Returns:
- the ISO 8601 textual representation of this temporal.
-
toShortISO8601
public String toShortISO8601()
Deprecated.Description copied from interface:Temporal
Gets an ISO 8601 textual representation of this temporal by taking into account of its underlying timezone. For datetime, the representation is at the accuracy to the minute. The ISO 8601 format in which the date is returned is one of the more common in the Web, that is with the datetime separators (the hyphen for dates and the double-points for times): yyyy-MM-dd'T'HH:mm:ss where yyyy means the year in 4 digits, MM means the month in year in two digits, dd means the day in month in two digits, HH means the hour (24-o'clock) in two digits, and mm means the minute in two digits.- Returns:
- a short ISO 8601 textual representation of this temporal.
-
toICal
public String toICal()
Deprecated.Description copied from interface:Temporal
Gets the ISO 8601 textual representation of this date as it is in the iCal specification. The returned iCal date representation is in this temporal's time zone. In the iCal specification, dates are represented in one of the ISO 8601 format, that is the complete format without any datetime separators (the hyphen character for dates and the double-points for times). In the iCal specification, no time zone information is added to the ISO 8601 representation of the date, nevertheless when the date is indicated in UTC, the 'Z' marker must be set in the date as required by the ISO 8601 standard.- Returns:
- the iCal textual representation of this temporal and in the timezone of this temporal.
-
toICalInUTC
public String toICalInUTC()
Deprecated.Description copied from interface:Temporal
Gets the ISO 8601 textual representation of this date as it is in the iCal specification. The returned iCal date representation is in explicitly set in UTC. In the iCal specification, dates are represented in one of the ISO 8601 format, that is the complete format without any date and time separators (the hyphen character for dates and the double-points for times). In the iCal specification, no time zone information is added to the ISO 8601 representation of the date, nevertheless when the date is indicated in UTC, the 'Z' marker must be set in the date as required by the ISO 8601 standard.- Returns:
- the iCal textual representation of this temporal and in UTC.
-
toLocalDate
public LocalDate toLocalDate()
Deprecated.Gets theLocalDate
representation of this Silverpeas date.- Returns:
- the local date of this date.
-
getTimeZone
public TimeZone getTimeZone()
Deprecated.The time zone has no meaning for a date.- Returns:
- the time zone in which this date is set.
-
isTimeSupported
public boolean isTimeSupported()
Deprecated.Description copied from interface:Temporal
Is this temporal supports the time unit?- Returns:
- true if this temporal supports the time unit. Time and datetime should return true here whereas date should return false.
-
next
public Date next()
Deprecated.The next date to this one.- Returns:
- the day after this one.
-
previous
public Date previous()
Deprecated.The previous date to this one.- Returns:
- the day preceding this one.
-
isBefore
public boolean isBefore(Date anotherDatable)
Deprecated.Description copied from interface:Temporal
Is this temporal strictly before in time the specified another one?- Parameters:
anotherDatable
- the another temporal to which this is compared.- Returns:
- true if this temporal is strictly before the another one.
-
isAfter
public boolean isAfter(Date anotherDatable)
Deprecated.Description copied from interface:Temporal
Is this temporal strictly after in time the specified another one?- Parameters:
anotherDatable
- the another temporal to which this is compared.- Returns:
- true if this temporal is strictly after the another one.
-
isEqualTo
public boolean isEqualTo(Date anotherDatable)
Deprecated.Description copied from interface:Temporal
Is this temporal equal in time to the specified another one?- Parameters:
anotherDatable
- the another temporal to which this is compared.- Returns:
- true if this temporal is equal with the another one.
-
-