Package org.silverpeas.core.date
Class AbstractDateTemporal<T extends Temporal<? super T>>
- java.lang.Object
-
- java.util.Date
-
- org.silverpeas.core.date.AbstractDateTemporal<T>
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<Date>
,Temporal<T>
@Deprecated public abstract class AbstractDateTemporal<T extends Temporal<? super T>> extends Date implements Temporal<T>
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.) User: Yohann Chastagnier Date: 06/12/13- 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
-
-
Constructor Summary
Constructors Constructor Description AbstractDateTemporal(long date)
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description T
addDays(int amount)
Deprecated.Adds a number of days to the temporal instance returning a new one.T
addHours(int amount)
Deprecated.Adds a number of hours to the temporal instance returning a new one.T
addMilliseconds(int amount)
Deprecated.Adds a number of milliseconds to the temporal instance returning a new one.T
addMinutes(int amount)
Deprecated.Adds a number of minutes to the temporal instance returning a new one.T
addMonths(int amount)
Deprecated.Adds a number of months to the temporal instance returning a new one.T
addSeconds(int amount)
Deprecated.Adds a number of seconds to the temporal instance returning a new one.T
addWeeks(int amount)
Deprecated.Adds a number of weeks to the temporal instance returning a new one.T
addYears(int amount)
Deprecated.Adds a number of years to the temporal instance returning a new one.abstract T
clone()
Deprecated.Clones itself.T
getBeginOfDay()
Deprecated.Computes first hour, minute, second, millisecond from the temporal instance.T
getBeginOfMonth()
Deprecated.Compute the first hour, minute, second, millisecond from the temporal instance.T
getBeginOfWeek()
Deprecated.Compute the first hour, minute, second, millisecond from the temporal instance.T
getBeginOfWeek(String locale)
Deprecated.Compute the first hour, minute, second, millisecond from the temporal instance and a given locale.T
getBeginOfYear()
Deprecated.Compute the first hour, minute, second, millisecond from the temporal instance.T
getEndOfDay()
Deprecated.Computes first hour, minute, second, millisecond from the temporal instance.T
getEndOfMonth()
Deprecated.Compute the date of the first day in the month from the temporal instance.T
getEndOfWeek()
Deprecated.Compute the date of the first day in the week from the temporal instance.T
getEndOfWeek(String locale)
Deprecated.Compute the date of the first day in the week from the temporal instance and a given locale.T
getEndOfYear()
Deprecated.Compute the date of the first day in the year from the temporal instance.Duration
getTimeDataTo(T anotherDatable)
Deprecated.Compute the time between the temporal instance and another one.boolean
isDefined()
Deprecated.Indicates is the date is different fromDateUtil.MINIMUM_DATE
orDateUtil.MAXIMUM_DATE
.boolean
isNotDefined()
Deprecated.Indicates the opposite ofTemporal.isDefined()
protected abstract T
newInstanceFrom(Date aDate)
Deprecated.Create a new instance from a given datetime in milliseconds.-
Methods inherited from class java.util.Date
after, before, compareTo, equals, from, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toInstant, toLocaleString, toString, UTC
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.date.Temporal
asDate, getTimeZone, inTimeZone, isAfter, isBefore, isEqualTo, isTimeSupported, toICal, toICalInUTC, toISO8601, toShortISO8601
-
-
-
-
Method Detail
-
clone
public abstract T clone()
Deprecated.Description copied from interface:Temporal
Clones itself.
-
getTimeDataTo
public Duration getTimeDataTo(T anotherDatable)
Deprecated.Description copied from interface:Temporal
Compute the time between the temporal instance and another one.
-
newInstanceFrom
protected abstract T newInstanceFrom(Date aDate)
Deprecated.Create a new instance from a given datetime in milliseconds.- Parameters:
aDate
- the datetime in milliseconds.- Returns:
- the new temporal instance corresponding to the given time in milliseconds.
-
getBeginOfDay
public T getBeginOfDay()
Deprecated.Description copied from interface:Temporal
Computes first hour, minute, second, millisecond from the temporal instance.- Specified by:
getBeginOfDay
in interfaceTemporal<T extends Temporal<? super T>>
- Returns:
- a date at last hour, minute, second and millisecond of the temporal instance.
-
getEndOfDay
public T getEndOfDay()
Deprecated.Description copied from interface:Temporal
Computes first hour, minute, second, millisecond from the temporal instance.- Specified by:
getEndOfDay
in interfaceTemporal<T extends Temporal<? super T>>
- Returns:
- a date at last hour, minute, second and millisecond of the temporal instance.
-
getBeginOfWeek
public T getBeginOfWeek()
Deprecated.Description copied from interface:Temporal
Compute the first hour, minute, second, millisecond from the temporal instance.- Specified by:
getBeginOfWeek
in interfaceTemporal<T extends Temporal<? super T>>
- Returns:
- a date at last hour, minute, second and millisecond of the temporal instance.
-
getEndOfWeek
public T getEndOfWeek()
Deprecated.Description copied from interface:Temporal
Compute the date of the first day in the week from the temporal instance.- Specified by:
getEndOfWeek
in interfaceTemporal<T extends Temporal<? super T>>
- Returns:
- a date for the first day of the week of the temporal instance.
-
getBeginOfWeek
public T getBeginOfWeek(String locale)
Deprecated.Description copied from interface:Temporal
Compute the first hour, minute, second, millisecond from the temporal instance and a given locale.- Specified by:
getBeginOfWeek
in interfaceTemporal<T extends Temporal<? super T>>
- Parameters:
locale
- the locale- Returns:
- a date at last hour, minute, second and millisecond of the temporal instance.
-
getEndOfWeek
public T getEndOfWeek(String locale)
Deprecated.Description copied from interface:Temporal
Compute the date of the first day in the week from the temporal instance and a given locale.- Specified by:
getEndOfWeek
in interfaceTemporal<T extends Temporal<? super T>>
- Parameters:
locale
- the locale- Returns:
- a date for the first day of the week of the temporal instance.
-
getBeginOfMonth
public T getBeginOfMonth()
Deprecated.Description copied from interface:Temporal
Compute the first hour, minute, second, millisecond from the temporal instance.- Specified by:
getBeginOfMonth
in interfaceTemporal<T extends Temporal<? super T>>
- Returns:
- a date at last hour, minute, second and millisecond of the temporal instance.
-
getEndOfMonth
public T getEndOfMonth()
Deprecated.Description copied from interface:Temporal
Compute the date of the first day in the month from the temporal instance.- Specified by:
getEndOfMonth
in interfaceTemporal<T extends Temporal<? super T>>
- Returns:
- a date for the first day of the month of the temporal instance.
-
getBeginOfYear
public T getBeginOfYear()
Deprecated.Description copied from interface:Temporal
Compute the first hour, minute, second, millisecond from the temporal instance.- Specified by:
getBeginOfYear
in interfaceTemporal<T extends Temporal<? super T>>
- Returns:
- a date at last hour, minute, second and millisecond of the temporal instance.
-
getEndOfYear
public T getEndOfYear()
Deprecated.Description copied from interface:Temporal
Compute the date of the first day in the year from the temporal instance.- Specified by:
getEndOfYear
in interfaceTemporal<T extends Temporal<? super T>>
- Returns:
- a date for the first day of the year of the temporal instance.
-
addYears
public T addYears(int amount)
Deprecated.Description copied from interface:Temporal
Adds a number of years to the temporal instance returning a new one. The originalTemporal
is unchanged.
-
addMonths
public T addMonths(int amount)
Deprecated.Description copied from interface:Temporal
Adds a number of months to the temporal instance returning a new one. The originalTemporal
is unchanged.
-
addWeeks
public T addWeeks(int amount)
Deprecated.Description copied from interface:Temporal
Adds a number of weeks to the temporal instance returning a new one. The originalTemporal
is unchanged.
-
addDays
public T addDays(int amount)
Deprecated.Description copied from interface:Temporal
Adds a number of days to the temporal instance returning a new one. The originalTemporal
is unchanged.
-
addHours
public T addHours(int amount)
Deprecated.Description copied from interface:Temporal
Adds a number of hours to the temporal instance returning a new one. The originalTemporal
is unchanged.
-
addMinutes
public T addMinutes(int amount)
Deprecated.Description copied from interface:Temporal
Adds a number of minutes to the temporal instance returning a new one. The originalTemporal
is unchanged.- Specified by:
addMinutes
in interfaceTemporal<T extends Temporal<? super T>>
- Parameters:
amount
- the amount to add, may be negative- Returns:
- the new
Temporal
with the amount added
-
addSeconds
public T addSeconds(int amount)
Deprecated.Description copied from interface:Temporal
Adds a number of seconds to the temporal instance returning a new one. The originalTemporal
is unchanged.- Specified by:
addSeconds
in interfaceTemporal<T extends Temporal<? super T>>
- Parameters:
amount
- the amount to add, may be negative- Returns:
- the new
Temporal
with the amount added
-
addMilliseconds
public T addMilliseconds(int amount)
Deprecated.Description copied from interface:Temporal
Adds a number of milliseconds to the temporal instance returning a new one. The originalTemporal
is unchanged.- Specified by:
addMilliseconds
in interfaceTemporal<T extends Temporal<? super T>>
- Parameters:
amount
- the amount to add, may be negative- Returns:
- the new
Temporal
with the amount added
-
isDefined
public boolean isDefined()
Deprecated.Description copied from interface:Temporal
Indicates is the date is different fromDateUtil.MINIMUM_DATE
orDateUtil.MAXIMUM_DATE
.
-
isNotDefined
public boolean isNotDefined()
Deprecated.Description copied from interface:Temporal
Indicates the opposite ofTemporal.isDefined()
- Specified by:
isNotDefined
in interfaceTemporal<T extends Temporal<? super T>>
- Returns:
- true if the date is undefined, false otherwise.
-
-