Package oracle.rules.sdk2.extensions
Class OracleDate
java.lang.Object
oracle.rules.sdk2.extensions.OracleDate
-
Method Summary
Modifier and TypeMethodDescriptionstatic oracle.jbo.domain.TimestampaddDaysTo(oracle.jbo.domain.Timestamp ts, int days) Returns a new Timestamp instance that is the result of adding the specified number of days to the specified Timestamp instance.static oracle.jbo.domain.TimestampaddDurationTo(oracle.jbo.domain.Timestamp ts, Duration duration) Returns a new Timestamp instance that is the result of adding the specified duration to the specified Timestamp instance.static oracle.jbo.domain.TimestampaddHoursTo(oracle.jbo.domain.Timestamp ts, long hours) Returns a new Timestamp instance that is the result of adding the specified number of hours to the specified Timestamp instance.static oracle.jbo.domain.TimestampaddMillisecondsTo(oracle.jbo.domain.Timestamp ts, long milliseconds) Returns a new Timestamp instance that is the result of adding the specified number of milliseconds to the specified Timestamp instance.static oracle.jbo.domain.TimestampaddMinutesTo(oracle.jbo.domain.Timestamp ts, long minutes) Returns a new Timestamp instance that is the result of adding the specified number of minutes to the specified Timestamp instance.static oracle.jbo.domain.TimestampaddMonthsTo(oracle.jbo.domain.Timestamp ts, int months) Returns a new Timestamp instance that is the result of adding the specified number of months to the specified Timestamp instance.static oracle.jbo.domain.TimestampaddSecondsTo(oracle.jbo.domain.Timestamp ts, long seconds) Returns a new Timestamp instance that is the result of adding the specified number of seconds to the specified Timestamp instance.static oracle.jbo.domain.TimestampaddWeeksTo(oracle.jbo.domain.Timestamp ts, int weeks) Returns a new Timestamp instance that is the result of adding the specified number of weeks to the specified Timestamp instance.static oracle.jbo.domain.TimestampaddYearsTo(oracle.jbo.domain.Timestamp ts, int years) Returns a new Timestamp instance that is the result of adding the specified number of years to the specified Timestamp instance.static oracle.jbo.domain.TimestampfromString(String str) Creates a Timestamp instance for the specified ISO 8601 date and time string.static oracle.jbo.domain.TimestampsubtractDaysFrom(oracle.jbo.domain.Timestamp ts, int days) Returns a new Timestamp instance that is the result of subtracting the specified number of days from the specified Timestamp instance.static oracle.jbo.domain.TimestampsubtractDurationFrom(oracle.jbo.domain.Timestamp ts, Duration duration) Returns a new Timestamp instance that is the result of subtracting the specified duration from the specified Timestamp instance.static oracle.jbo.domain.TimestampsubtractHoursFrom(oracle.jbo.domain.Timestamp ts, long hours) Returns a new Timestamp instance that is the result of subtracting the specified number of hours from the specified Timestamp instance.static oracle.jbo.domain.TimestampsubtractMillisecondsFrom(oracle.jbo.domain.Timestamp ts, long milliseconds) Returns a new Timestamp instance that is the result of subtracting the specified number of milliseconds from the specified Timestamp instance.static oracle.jbo.domain.TimestampsubtractMinutesFrom(oracle.jbo.domain.Timestamp ts, long minutes) Returns a new Timestamp instance that is the result of subtracting the specified number of minutes from the specified Timestamp instance.static oracle.jbo.domain.TimestampsubtractMonthsFrom(oracle.jbo.domain.Timestamp ts, int months) Returns a new Timestamp instance that is the result of subtracting the specified number of months from the date.static oracle.jbo.domain.TimestampsubtractSecondsFrom(oracle.jbo.domain.Timestamp ts, long seconds) Returns a new Timestamp instance that is the result of subtracting the specified number of seconds from the specified Timestamp instance.static oracle.jbo.domain.TimestampsubtractWeeksFrom(oracle.jbo.domain.Timestamp ts, int weeks) Returns a new Timestamp instance that is the result of subtracting the specified number of weeks from the specified Timestamp instance.static oracle.jbo.domain.TimestampsubtractYearsFrom(oracle.jbo.domain.Timestamp ts, int years) Returns a new Timestamp instance that is the result of subtracting the specified number of years from the specified Timestamp instance.static GregorianCalendartoGregorianCalendar(oracle.jbo.domain.Timestamp ts) Return a GregorianCalendar representing the specified Timestampstatic StringtoString(oracle.jbo.domain.Timestamp ts) Return the ISO 8601 representation of the specified Timestamp instance.
-
Method Details
-
addYearsTo
public static oracle.jbo.domain.Timestamp addYearsTo(oracle.jbo.domain.Timestamp ts, int years) Returns a new Timestamp instance that is the result of adding the specified number of years to the specified Timestamp instance.- Parameters:
ts- the starting Timestamp instanceyears- the number of years to add- Returns:
- a new Timestamp that is the result of adding the specified number of years to the specified Timestamp instance.
- Throws:
NullPointerException- if the timestamp parameter is null.
-
addDurationTo
public static oracle.jbo.domain.Timestamp addDurationTo(oracle.jbo.domain.Timestamp ts, Duration duration) Returns a new Timestamp instance that is the result of adding the specified duration to the specified Timestamp instance.- Parameters:
ts- the starting Timestamp instanceduration-- Returns:
- a new Timestamp that is the result of adding the specified duration to the specified Timestamp instance.
- Throws:
NullPointerException- if either parameter is null.
-
addMonthsTo
public static oracle.jbo.domain.Timestamp addMonthsTo(oracle.jbo.domain.Timestamp ts, int months) Returns a new Timestamp instance that is the result of adding the specified number of months to the specified Timestamp instance.- Parameters:
ts- the starting Timestamp instancemonths- the number of months to add- Returns:
- a new Timestamp instance that is the result of adding the specified number of months to the specified Timestamp instance.
- Throws:
NullPointerException- if the Timestamp parameter is null.
-
addWeeksTo
public static oracle.jbo.domain.Timestamp addWeeksTo(oracle.jbo.domain.Timestamp ts, int weeks) Returns a new Timestamp instance that is the result of adding the specified number of weeks to the specified Timestamp instance.- Parameters:
ts- the starting Timestamp instanceweeks- the number of weeks to add- Returns:
- a new Timestamp instance that is the result of adding the specified number of weeks to the specified Timestamp instance.
- Throws:
NullPointerException- if the Timestamp parameter is null.
-
addDaysTo
public static oracle.jbo.domain.Timestamp addDaysTo(oracle.jbo.domain.Timestamp ts, int days) Returns a new Timestamp instance that is the result of adding the specified number of days to the specified Timestamp instance.- Parameters:
ts- the starting Timestamp instancedays- the number of days to add- Returns:
- a new Timestamp instance that is the result of adding the specified number of days to the specified Timestamp instance.
- Throws:
NullPointerException- if the Timestamp parameter is null.
-
addHoursTo
public static oracle.jbo.domain.Timestamp addHoursTo(oracle.jbo.domain.Timestamp ts, long hours) Returns a new Timestamp instance that is the result of adding the specified number of hours to the specified Timestamp instance.- Parameters:
ts- the starting Timestamp instancehours- the number of hours to add- Returns:
- a new Timestamp instance that is the result of adding the specified number of hours to the specified Timestamp instance.
- Throws:
NullPointerException- if the Timestamp parameter is null.
-
addMinutesTo
public static oracle.jbo.domain.Timestamp addMinutesTo(oracle.jbo.domain.Timestamp ts, long minutes) Returns a new Timestamp instance that is the result of adding the specified number of minutes to the specified Timestamp instance.- Parameters:
ts- the starting Timestamp instanceminutes- the number of minutes to add- Returns:
- a new Timestamp instance that is the result of adding the specified number of minutes to the specified Timestamp instance.
- Throws:
NullPointerException- if the Timestamp parameter is null.
-
addSecondsTo
public static oracle.jbo.domain.Timestamp addSecondsTo(oracle.jbo.domain.Timestamp ts, long seconds) Returns a new Timestamp instance that is the result of adding the specified number of seconds to the specified Timestamp instance.- Parameters:
ts- the starting Timestamp instanceseconds- the number of seconds to add- Returns:
- a new Timestamp instance that is the result of adding the specified number of seconds to the specified Timestamp instance.
- Throws:
NullPointerException- if the Timestamp parameter is null.
-
addMillisecondsTo
public static oracle.jbo.domain.Timestamp addMillisecondsTo(oracle.jbo.domain.Timestamp ts, long milliseconds) Returns a new Timestamp instance that is the result of adding the specified number of milliseconds to the specified Timestamp instance.- Parameters:
ts- the starting Timestamp instancemilliseconds- the number of milliseconds to add- Returns:
- a new Timestamp instance that is the result of adding the specified number of milliseconds to the specified Timestamp instance.
- Throws:
NullPointerException- if the Timestamp parameter is null.
-
subtractYearsFrom
public static oracle.jbo.domain.Timestamp subtractYearsFrom(oracle.jbo.domain.Timestamp ts, int years) Returns a new Timestamp instance that is the result of subtracting the specified number of years from the specified Timestamp instance.- Parameters:
ts- the starting Timestamp instanceyears- the number of years to subtract- Returns:
- a new Timestamp instance that is the result of subtracting the specified number of years from the specified Timestamp instance.
- Throws:
NullPointerException- if the Timestamp parameter is null.
-
subtractDurationFrom
public static oracle.jbo.domain.Timestamp subtractDurationFrom(oracle.jbo.domain.Timestamp ts, Duration duration) Returns a new Timestamp instance that is the result of subtracting the specified duration from the specified Timestamp instance.- Parameters:
ts- the starting Timestamp instanceduration-- Returns:
- a new Timestamp instance that is the result of subtracting the specified duration from the specified Timestamp instance.
- Throws:
NullPointerException- if either parameter is null.
-
subtractMonthsFrom
public static oracle.jbo.domain.Timestamp subtractMonthsFrom(oracle.jbo.domain.Timestamp ts, int months) Returns a new Timestamp instance that is the result of subtracting the specified number of months from the date.- Parameters:
ts- the starting Timestamp instancemonths- the number of months to subtract- Returns:
- a new Timestamp instance that is the result of subtracting the specified number of months from the specified Timestamp instance.
- Throws:
NullPointerException- if the Timestamp parameter is null.
-
subtractWeeksFrom
public static oracle.jbo.domain.Timestamp subtractWeeksFrom(oracle.jbo.domain.Timestamp ts, int weeks) Returns a new Timestamp instance that is the result of subtracting the specified number of weeks from the specified Timestamp instance.- Parameters:
ts- the starting Timestamp instanceweeks- the number of weeks to subtract- Returns:
- a new Timestamp instance that is the result of subtracting the specified number of weeks from the specified Timestamp instance.
- Throws:
NullPointerException- if the Timestamp parameter is null.
-
subtractDaysFrom
public static oracle.jbo.domain.Timestamp subtractDaysFrom(oracle.jbo.domain.Timestamp ts, int days) Returns a new Timestamp instance that is the result of subtracting the specified number of days from the specified Timestamp instance.- Parameters:
ts- the starting Timestamp instancedays- the number of days to subtract- Returns:
- a new Timestamp instance that is the result of subtracting the specified number of days from the specified Timestamp instance.
- Throws:
NullPointerException- if the Timestamp parameter is null.
-
subtractHoursFrom
public static oracle.jbo.domain.Timestamp subtractHoursFrom(oracle.jbo.domain.Timestamp ts, long hours) Returns a new Timestamp instance that is the result of subtracting the specified number of hours from the specified Timestamp instance.- Parameters:
ts- the starting Timestamp instancehours- the number of hours to subtract- Returns:
- a new Timestamp instance that is the result of subtracting the specified number of hours from the specified Timestamp instance.
- Throws:
NullPointerException- if the Timestamp parameter is null.
-
subtractMinutesFrom
public static oracle.jbo.domain.Timestamp subtractMinutesFrom(oracle.jbo.domain.Timestamp ts, long minutes) Returns a new Timestamp instance that is the result of subtracting the specified number of minutes from the specified Timestamp instance.- Parameters:
ts- the starting Timestamp instanceminutes- the number of minutes to subtract- Returns:
- a new Timestamp instance that is the result of subtracting the specified number of minutes from the specified Timestamp instance.
- Throws:
NullPointerException- if the Timestamp parameter is null.
-
subtractSecondsFrom
public static oracle.jbo.domain.Timestamp subtractSecondsFrom(oracle.jbo.domain.Timestamp ts, long seconds) Returns a new Timestamp instance that is the result of subtracting the specified number of seconds from the specified Timestamp instance.- Parameters:
ts- the starting Timestamp instanceseconds- the number of seconds to subtract- Returns:
- a new Timestamp instance that is the result of subtracting the specified number of seconds from the specified Timestamp instance.
- Throws:
NullPointerException- if the Timestamp parameter is null.
-
subtractMillisecondsFrom
public static oracle.jbo.domain.Timestamp subtractMillisecondsFrom(oracle.jbo.domain.Timestamp ts, long milliseconds) Returns a new Timestamp instance that is the result of subtracting the specified number of milliseconds from the specified Timestamp instance.- Parameters:
ts- the starting Timestamp instancemilliseconds- the number of milliseconds to subtract- Returns:
- a new Timestamp instance that is the result of subtracting the specified number of milliseconds from the specified Timestamp instance.
- Throws:
NullPointerException- if the Timestamp parameter is null.
-
fromString
Creates a Timestamp instance for the specified ISO 8601 date and time string.- Parameters:
str- the ISO 8601 string representation of a date and time- Returns:
- a Timestamp instance for the specified date and time
- Throws:
IllegalArgumentException- if an error occurs parsing the date string
-
toString
Return the ISO 8601 representation of the specified Timestamp instance.- Parameters:
ts- the Timestamp instance to format- Returns:
- the ISO 8601 representation
-
toGregorianCalendar
Return a GregorianCalendar representing the specified Timestamp- Parameters:
ts- the Timestamp instance to convert- Returns:
- the new calendar instance
-