Package oracle.rules.sdk2.extensions
Class OracleDuration
java.lang.Object
oracle.rules.rl.extensions.Duration
oracle.rules.sdk2.extensions.OracleDuration
-
Method Summary
Modifier and TypeMethodDescriptionstatic Duration
Compute XML dayTimeDuration between 2 dates.static Duration
between
(XMLGregorianCalendar date1, oracle.jbo.domain.Timestamp date2) Compute XML dayTimeDuration between 2 dates.static Duration
Compute XML dayTimeDuration between 2 dates.static Duration
between
(oracle.jbo.domain.Timestamp date1, XMLGregorianCalendar date2) Compute XML dayTimeDuration between 2 dates.static Duration
between
(oracle.jbo.domain.Timestamp date1, oracle.jbo.domain.Timestamp date2) Compute XML dayTimeDuration between 2 dates.static int
Compares two dates and returns an int value of 0 if they are equal, less than 0 ifcal1
represents a point in time beforets2
, greater than 0 ifcal1
represents a point in time afterts2
.static int
compare
(XMLGregorianCalendar cal1, oracle.jbo.domain.Timestamp ts2) Compares two dates and returns an int value of 0 if they are equal, less than 0 ifcal1
represents a point in time beforets2
, greater than 0 ifcal1
represents a point in time afterts2
.static int
Compares two dates and returns an int value of 0 if they are equal, less than 0 ifts1
represents a point in time beforecal2
, greater than 0 ifts1
represents a point in time aftercal2
.static int
compare
(oracle.jbo.domain.Timestamp ts1, XMLGregorianCalendar cal2) Compares two dates and returns an int value of 0 if they are equal, less than 0 ifts1
represents a point in time beforecal2
, greater than 0 ifts1
represents a point in time aftercal2
.static int
compare
(oracle.jbo.domain.Timestamp ts1, oracle.jbo.domain.Timestamp ts2) Compares two dates and returns an int value of 0 if they are equal, less than 0 ifts1
represents a point in time beforets2
, greater than 0 ifts1
represents a point in time afterts2
.static int
daysBetween
(Calendar cal1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in days.static int
daysBetween
(XMLGregorianCalendar cal1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in days.static int
daysBetween
(oracle.jbo.domain.Timestamp ts1, Calendar cal2) Returns the difference between the two dates in days.static int
daysBetween
(oracle.jbo.domain.Timestamp ts1, XMLGregorianCalendar cal2) Returns the difference between the two dates in days.static int
daysBetween
(oracle.jbo.domain.Timestamp ts1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in days.static long
hoursBetween
(Calendar cal1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in hours.static long
hoursBetween
(XMLGregorianCalendar cal1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in hours.static long
hoursBetween
(oracle.jbo.domain.Timestamp ts1, Calendar cal2) Returns the difference between the two dates in hours.static long
hoursBetween
(oracle.jbo.domain.Timestamp ts1, XMLGregorianCalendar cal2) Returns the difference between the two dates in hours.static long
hoursBetween
(oracle.jbo.domain.Timestamp ts1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in hours.static long
millisecondsBetween
(Calendar cal1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in milliseconds.static long
millisecondsBetween
(XMLGregorianCalendar cal1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in milliseconds.static long
millisecondsBetween
(oracle.jbo.domain.Timestamp ts1, Calendar cal2) Returns the difference between the two dates in milliseconds.static long
millisecondsBetween
(oracle.jbo.domain.Timestamp ts1, XMLGregorianCalendar cal2) Returns the difference between the two dates in milliseconds.static long
millisecondsBetween
(oracle.jbo.domain.Timestamp ts1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in milliseconds.static long
minutesBetween
(Calendar cal1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in minutes.static long
minutesBetween
(XMLGregorianCalendar cal1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in minutes.static long
minutesBetween
(oracle.jbo.domain.Timestamp ts1, Calendar cal2) Returns the difference between the two dates in minutes.static long
minutesBetween
(oracle.jbo.domain.Timestamp ts1, XMLGregorianCalendar cal2) Returns the difference between the two dates in minutes.static long
minutesBetween
(oracle.jbo.domain.Timestamp ts1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in minutes.static int
monthsBetween
(Calendar cal1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in months.static int
monthsBetween
(XMLGregorianCalendar cal1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in months.static int
monthsBetween
(oracle.jbo.domain.Timestamp ts1, Calendar cal2) Returns the difference between the two dates in months.static int
monthsBetween
(oracle.jbo.domain.Timestamp ts1, XMLGregorianCalendar cal2) Returns the difference between the two dates in months.static int
monthsBetween
(oracle.jbo.domain.Timestamp ts1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in months.static long
secondsBetween
(Calendar cal1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in seconds.static long
secondsBetween
(XMLGregorianCalendar cal1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in seconds.static long
secondsBetween
(oracle.jbo.domain.Timestamp ts1, Calendar cal2) Returns the difference between the two dates in seconds.static long
secondsBetween
(oracle.jbo.domain.Timestamp ts1, XMLGregorianCalendar cal2) Returns the difference between the two dates in seconds.static long
secondsBetween
(oracle.jbo.domain.Timestamp ts1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in seconds.static int
weeksBetween
(Calendar cal1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in weeks.static int
weeksBetween
(XMLGregorianCalendar cal1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in weeks.static int
weeksBetween
(oracle.jbo.domain.Timestamp ts1, Calendar cal2) Returns the difference between the two dates in weeks.static int
weeksBetween
(oracle.jbo.domain.Timestamp ts1, XMLGregorianCalendar cal2) Returns the difference between the two dates in weeks.static int
weeksBetween
(oracle.jbo.domain.Timestamp ts1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in weeks.static int
yearsBetween
(Calendar cal1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in years.static int
yearsBetween
(XMLGregorianCalendar cal1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in years.static int
yearsBetween
(oracle.jbo.domain.Timestamp ts1, Calendar cal2) Returns the difference between the two dates in years.static int
yearsBetween
(oracle.jbo.domain.Timestamp ts1, XMLGregorianCalendar cal2) Returns the difference between the two dates in years.static int
yearsBetween
(oracle.jbo.domain.Timestamp ts1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in years.Methods inherited from class oracle.rules.rl.extensions.Duration
between, between, between, between, compare, compare, compare, compare, compareDurations, daysBetween, daysBetween, daysBetween, daysBetween, divide, divide, fromString, getSeconds, hoursBetween, hoursBetween, hoursBetween, hoursBetween, isDayTimeDuration, isYearMonthDuration, millisecondsBetween, millisecondsBetween, millisecondsBetween, millisecondsBetween, minutesBetween, minutesBetween, minutesBetween, minutesBetween, monthsBetween, monthsBetween, monthsBetween, monthsBetween, multiply, multiply, ratio, secondsBetween, secondsBetween, secondsBetween, secondsBetween, weeksBetween, weeksBetween, weeksBetween, weeksBetween, yearsBetween, yearsBetween, yearsBetween, yearsBetween
-
Method Details
-
yearsBetween
public static int yearsBetween(oracle.jbo.domain.Timestamp ts1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in years. The difference may be negative if the first date is later than the second date. Any resulting fractional year is truncated.ts1
andts2
are converted to instances ofGregorianCalendar
before the difference is calculated.- Parameters:
ts1
- the starting Timestamp instancets2
- the ending Timestamp instance- Returns:
- the number of years between the
ts1
andts2
. - Throws:
NullPointerException
- if eitherts1
orts2
is null.
-
yearsBetween
Returns the difference between the two dates in years. The difference may be negative if the first date is later than the second date. Any resulting fractional year is truncated.ts1
is converted to an instance ofGregorianCalendar
before the difference is calculated.- Parameters:
ts1
- the starting Timestamp instancecal2
- the ending Calendar instance- Returns:
- the number of years between the
ts1
andcal2
. - Throws:
NullPointerException
- if eitherts1
orcal2
is null.
-
yearsBetween
Returns the difference between the two dates in years. The difference may be negative if the first date is later than the second date. Any resulting fractional year is truncated.date2
is converted to an instance ofGregorianCalendar
before the difference is calculated.- Parameters:
cal1
- the starting Calendar instancets2
- the ending Timestamp instance- Returns:
- the number of years between the
cal1
thets2
. - Throws:
NullPointerException
- if either cal1 orts2
is null.
-
yearsBetween
Returns the difference between the two dates in years. The difference may be negative if the first date is later than the second date. Any resulting fractional year is truncated.date1
anddate2
are converted toGregorianCalendar
before the difference is calculated.- Parameters:
ts1
- the starting Timestamp instancecal2
- the ending XMLGregorianCalendar instance- Returns:
- the number of years between the date1 and date2.
- Throws:
NullPointerException
- if eitherts1
orcal2
is null.
-
yearsBetween
Returns the difference between the two dates in years. The difference may be negative if the first date is later than the second date. Any resulting fractional year is truncated.date1
anddate2
are converted toGregorianCalendar
before the difference is calculated.- Parameters:
cal1
- the starting XMLGregorianCalendar instancets2
- the ending Timestamp instance- Returns:
- the number of years between the
cal1
thets2
. - Throws:
NullPointerException
- if either cal1 orts2
is null.
-
monthsBetween
public static int monthsBetween(oracle.jbo.domain.Timestamp ts1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in months. The difference may be negative if the first date is later than the second date. Any resulting fractional month is truncated.- Parameters:
ts1
- the starting Timestamp instancets2
- the ending Timestamp instance- Returns:
- the number of months between the
ts1
andts2
. - Throws:
NullPointerException
- if eitherts1
orts2
is null.
-
monthsBetween
Returns the difference between the two dates in months. The difference may be negative if the first date is later than the second date. Any resulting fractional month is truncated.- Parameters:
cal1
- the starting Calendar instancets2
- the ending Timestamp instance- Returns:
- the number of months between the
cal1
thets2
. - Throws:
NullPointerException
- if either cal1 orts2
is null.
-
monthsBetween
Returns the difference between the two dates in months. The difference may be negative if the first date is later than the second date. Any resulting fractional month is truncated.- Parameters:
ts1
- the starting Timestamp instancecal2
- the ending Calendar instance- Returns:
- the number of months between the
ts1
andcal2
. - Throws:
NullPointerException
- if eitherts1
orcal2
is null.
-
monthsBetween
Returns the difference between the two dates in months. The difference may be negative if the first date is later than the second date. Any resulting fractional month is truncated.- Parameters:
cal1
- the starting XMLGregorianCalendar instancets2
- the ending Timestamp instance- Returns:
- the number of months between the
cal1
thets2
. - Throws:
NullPointerException
- if either cal1 orts2
is null.
-
monthsBetween
Returns the difference between the two dates in months. The difference may be negative if the first date is later than the second date. Any resulting fractional month is truncated.- Parameters:
ts1
- the starting Timestamp instancecal2
- the ending XMLGregorianCalendar instance- Returns:
- the number of months between the
ts1
andcal2
. - Throws:
NullPointerException
- if eitherts1
orcal2
is null.
-
weeksBetween
public static int weeksBetween(oracle.jbo.domain.Timestamp ts1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in weeks. The difference may be negative if the first date is later than the second date. Any resulting fractional week is truncated.ts1
andts2
are converted toGregorianCalendar
before the difference is calculated.- Parameters:
ts1
- the starting Timestamp instancets2
- the ending Timestamp instance- Returns:
- the number of weeks between the
ts1
andts2
. - Throws:
NullPointerException
- if eitherts1
orts2
is null.
-
weeksBetween
Returns the difference between the two dates in weeks. The difference may be negative if the first date is later than the second date. Any resulting fractional week is truncated.ts1
andcal2
are converted toGregorianCalendar
before the difference is calculated.- Parameters:
ts1
- the starting Timestamp instancecal2
- the ending Calendar instance- Returns:
- the number of weeks between the
ts1
andcal2
. - Throws:
NullPointerException
- if eitherts1
orcal2
is null.
-
weeksBetween
Returns the difference between the two dates in weeks. The difference may be negative if the first date is later than the second date. Any resulting fractional week is truncated.cal1
andts2
are converted toGregorianCalendar
before the difference is calculated.- Parameters:
cal1
- the starting Calendar instancets2
- the ending Timestamp instance- Returns:
- the number of weeks between the
cal1
thets2
. - Throws:
NullPointerException
- if either cal1 orts2
is null.
-
weeksBetween
Returns the difference between the two dates in weeks. The difference may be negative if the first date is later than the second date. Any resulting fractional week is truncated.ts1
andcal2
are converted toGregorianCalendar
before the difference is calculated.- Parameters:
ts1
- the starting Timestamp instancecal2
- the ending XMLGregorianCalendar instance- Returns:
- the number of weeks between the
ts1
andcal2
. - Throws:
NullPointerException
- if eitherts1
orcal2
is null.
-
weeksBetween
Returns the difference between the two dates in weeks. The difference may be negative if the first date is later than the second date. Any resulting fractional week is truncated.cal1
andts2
are converted toGregorianCalendar
before the difference is calculated.- Parameters:
cal1
- the starting XMLGregorianCalendar instancets2
- the ending Timestamp instance- Returns:
- the number of weeks between the
cal1
thets2
. - Throws:
NullPointerException
- if either cal1 orts2
is null.
-
daysBetween
public static int daysBetween(oracle.jbo.domain.Timestamp ts1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in days. The difference may be negative if the first date is later than the second date. Any resulting fractional day is truncated.ts1
andts2
are converted toGregorianCalendar
before the difference is calculated.- Parameters:
ts1
- the starting Timestamp instancets2
- the ending Timestamp instance- Returns:
- the number of weeks between the
ts1
andts2
. - Throws:
NullPointerException
- if eitherts1
orts2
is null.
-
daysBetween
Returns the difference between the two dates in days. The difference may be negative if the first date is later than the second date. Any resulting fractional day is truncated.cal1
andts2
are converted toGregorianCalendar
before the difference is calculated.- Parameters:
cal1
- the starting Calendar instancets2
- the ending Timestamp instance- Returns:
- the number of weeks between the
cal1
thets2
. - Throws:
NullPointerException
- if either cal1 orts2
is null.
-
daysBetween
Returns the difference between the two dates in days. The difference may be negative if the first date is later than the second date. Any resulting fractional day is truncated.ts1
andcal2
are converted toGregorianCalendar
before the difference is calculated.- Parameters:
ts1
- the starting Timestamp instancecal2
- the ending Calendar instance- Returns:
- the number of weeks between the
ts1
andcal2
. - Throws:
NullPointerException
- if eitherts1
orcal2
is null.
-
daysBetween
Returns the difference between the two dates in days. The difference may be negative if the first date is later than the second date. Any resulting fractional day is truncated.cal1
andts2
are converted toGregorianCalendar
before the difference is calculated.- Parameters:
cal1
- the starting XMLGregorianCalendar instancets2
- the ending Timestamp instance- Returns:
- the number of weeks between the
cal1
thets2
. - Throws:
NullPointerException
- if either cal1 orts2
is null.
-
daysBetween
Returns the difference between the two dates in days. The difference may be negative if the first date is later than the second date. Any resulting fractional day is truncated.ts1
andcal2
are converted toGregorianCalendar
before the difference is calculated.- Parameters:
ts1
- the starting Timestamp instancecal2
- the ending Calendar instance- Returns:
- the number of weeks between the
ts1
andcal2
. - Throws:
NullPointerException
- if eitherts1
orcal2
is null.
-
hoursBetween
public static long hoursBetween(oracle.jbo.domain.Timestamp ts1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in hours. The difference may be negative if the first date is later than the second date. Any resulting fractional hour is truncated.- Parameters:
ts1
- the starting Timestamp instancets2
- the ending Timestamp instance- Returns:
- the number of hours between the
ts1
andts2
. - Throws:
NullPointerException
- if eitherts1
orts2
is null.
-
hoursBetween
Returns the difference between the two dates in hours. The difference may be negative if the first date is later than the second date. Any resulting fractional hour is truncated.- Parameters:
ts1
- the starting Timestamp instancecal2
- the ending Calendar instance- Returns:
- the number of hours between the
ts1
andcal2
. - Throws:
NullPointerException
- if eitherts1
orcal2
is null.
-
hoursBetween
Returns the difference between the two dates in hours. The difference may be negative if the first date is later than the second date. Any resulting fractional hour is truncated.- Parameters:
cal1
- the starting Calendar instancets2
- the ending Timestamp instance- Returns:
- the number of hours between the
cal1
thets2
. - Throws:
NullPointerException
- if either cal1 orts2
is null.
-
hoursBetween
Returns the difference between the two dates in hours. The difference may be negative if the first date is later than the second date. Any resulting fractional hour is truncated.- Parameters:
ts1
- the starting Timestamp instancecal2
- the ending Calendar instance- Returns:
- the number of hours between the
ts1
andcal2
. - Throws:
NullPointerException
- if eitherts1
orcal2
is null.
-
hoursBetween
Returns the difference between the two dates in hours. The difference may be negative if the first date is later than the second date. Any resulting fractional hour is truncated.- Parameters:
cal1
- the starting XMLGregorianCalendar instancets2
- the ending Timestamp instance- Returns:
- the number of hours between the
cal1
thets2
. - Throws:
NullPointerException
- if either cal1 orts2
is null.
-
minutesBetween
public static long minutesBetween(oracle.jbo.domain.Timestamp ts1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in minutes. The difference may be negative if the first date is later than the second date. Any resulting fractional minute is truncated.- Parameters:
ts1
- the starting Timestamp instancets2
- the ending Timestamp instance- Returns:
- the number of minutes between the
ts1
andts2
. - Throws:
NullPointerException
- if eitherts1
orts2
is null.
-
minutesBetween
Returns the difference between the two dates in minutes. The difference may be negative if the first date is later than the second date. Any resulting fractional minute is truncated.- Parameters:
ts1
- the starting Timestamp instancecal2
- the ending Calendar instance- Returns:
- the number of minutes between the
ts1
andcal2
. - Throws:
NullPointerException
- if eitherts1
orcal2
is null.
-
minutesBetween
Returns the difference between the two dates in minutes. The difference may be negative if the first date is later than the second date. Any resulting fractional minute is truncated.- Parameters:
cal1
- the starting Calendar instancets2
- the ending Timestamp instance- Returns:
- the number of minutes between the
cal1
thets2
. - Throws:
NullPointerException
- if either cal1 orts2
is null.
-
minutesBetween
Returns the difference between the two dates in minutes. The difference may be negative if the first date is later than the second date. Any resulting fractional minute is truncated.- Parameters:
ts1
- the starting Timestamp instancecal2
- the ending Calendar instance- Returns:
- the number of minutes between the
ts1
andcal2
. - Throws:
NullPointerException
- if eitherts1
orcal2
is null.
-
minutesBetween
Returns the difference between the two dates in minutes. The difference may be negative if the first date is later than the second date. Any resulting fractional minute is truncated.- Parameters:
cal1
- the starting XMLGregorianCalendar instancets2
- the ending Timestamp instance- Returns:
- the number of minutes between the
cal1
thets2
. - Throws:
NullPointerException
- if either cal1 orts2
is null.
-
secondsBetween
public static long secondsBetween(oracle.jbo.domain.Timestamp ts1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in seconds. The difference may be negative if the first date is later than the second date. Any resulting fractional second is truncated.- Parameters:
ts1
- the starting Timestamp instancets2
- the ending Timestamp instance- Returns:
- the number of seconds between the
ts1
andts2
. - Throws:
NullPointerException
- if eitherts1
orts2
is null.
-
secondsBetween
Returns the difference between the two dates in seconds. The difference may be negative if the first date is later than the second date. Any resulting fractional second is truncated.- Parameters:
ts1
- the starting Timestamp instancecal2
- the ending Calendar instance- Returns:
- the number of seconds between the
ts1
andcal2
. - Throws:
NullPointerException
- if eitherts1
orcal2
is null.
-
secondsBetween
Returns the difference between the two dates in seconds. The difference may be negative if the first date is later than the second date. Any resulting fractional second is truncated.- Parameters:
cal1
- the starting Calendar instancets2
- the ending Timestamp instance- Returns:
- the number of seconds between the
cal1
thets2
. - Throws:
NullPointerException
- if either cal1 orts2
is null.
-
secondsBetween
Returns the difference between the two dates in seconds. The difference may be negative if the first date is later than the second date. Any resulting fractional second is truncated.- Parameters:
ts1
- the starting Timestamp instancecal2
- the ending Calendar instance- Returns:
- the number of seconds between the
ts1
andcal2
. - Throws:
NullPointerException
- if eitherts1
orcal2
is null.
-
secondsBetween
Returns the difference between the two dates in seconds. The difference may be negative if the first date is later than the second date. Any resulting fractional second is truncated.- Parameters:
cal1
- the starting XMLGregorianCalendar instancets2
- the ending Timestamp instance- Returns:
- the number of seconds between the
cal1
thets2
. - Throws:
NullPointerException
- if either cal1 orts2
is null.
-
millisecondsBetween
public static long millisecondsBetween(oracle.jbo.domain.Timestamp ts1, oracle.jbo.domain.Timestamp ts2) Returns the difference between the two dates in milliseconds. The difference may be negative if the first date is later than the second date.- Parameters:
ts1
- the starting Timestamp instancets2
- the ending Timestamp instance- Returns:
- the number of milliseconds between the
ts1
andts2
. - Throws:
NullPointerException
- if eitherts1
orts2
is null.
-
millisecondsBetween
Returns the difference between the two dates in milliseconds. The difference may be negative if the first date is later than the second date.- Parameters:
cal1
- the starting Calendar instancets2
- the ending Timestamp instance- Returns:
- the number of milliseconds between the
cal1
thets2
. - Throws:
NullPointerException
- if either cal1 orts2
is null.
-
millisecondsBetween
Returns the difference between the two dates in milliseconds. The difference may be negative if the first date is later than the second date.- Parameters:
ts1
- the starting Timestamp instancecal2
- the ending Calendar instance- Returns:
- the number of milliseconds between the
ts1
andcal2
. - Throws:
NullPointerException
- if eitherts1
orcal2
is null.
-
millisecondsBetween
Returns the difference between the two dates in milliseconds. The difference may be negative if the first date is later than the second date.- Parameters:
cal1
- the starting XMLGregorianCalendar instancets2
- the ending Timestamp instance- Returns:
- the number of milliseconds between the
cal1
thets2
. - Throws:
NullPointerException
- if either cal1 orts2
is null.
-
millisecondsBetween
Returns the difference between the two dates in milliseconds. The difference may be negative if the first date is later than the second date.- Parameters:
ts1
- the starting Timestamp instancecal2
- the ending XMLGregorianCalendar instance- Returns:
- the number of milliseconds between the
ts1
andcal2
. - Throws:
NullPointerException
- if eitherts1
orcal2
is null.
-
compare
public static int compare(oracle.jbo.domain.Timestamp ts1, oracle.jbo.domain.Timestamp ts2) Compares two dates and returns an int value- of 0 if they are equal,
- less than 0 if
ts1
represents a point in time beforets2
, - greater than 0 if
ts1
represents a point in time afterts2
.
- Parameters:
ts1
- the left-hand side Timestamp instancets2
- the right-hand side Timestamp instance- Returns:
- the relative comparison result.
-
compare
Compares two dates and returns an int value- of 0 if they are equal,
- less than 0 if
ts1
represents a point in time beforecal2
, - greater than 0 if
ts1
represents a point in time aftercal2
.
- Parameters:
ts1
- the left-hand side Timestamp instancecal2
- the right-hand side Calendar instance- Returns:
- the relative comparison result.
-
compare
Compares two dates and returns an int value- of 0 if they are equal,
- less than 0 if
cal1
represents a point in time beforets2
, - greater than 0 if
cal1
represents a point in time afterts2
.
- Parameters:
cal1
- the left-hand side Calendar instancets2
- the right-hand side Timestamp instance- Returns:
- the relative comparison result.
-
compare
Compares two dates and returns an int value- of 0 if they are equal,
- less than 0 if
ts1
represents a point in time beforecal2
, - greater than 0 if
ts1
represents a point in time aftercal2
.
- Parameters:
ts1
- the left-hand side Timestamp instancecal2
- the right-hand side XMLGregorianCalendar instance- Returns:
- the relative comparison result.
-
compare
Compares two dates and returns an int value- of 0 if they are equal,
- less than 0 if
cal1
represents a point in time beforets2
, - greater than 0 if
cal1
represents a point in time afterts2
.
- Parameters:
cal1
- the left-hand side XMLGregorianCalendar instancets2
- the right-hand side Timestamp instance- Returns:
- the relative comparison result.
-
between
public static Duration between(oracle.jbo.domain.Timestamp date1, oracle.jbo.domain.Timestamp date2) Compute XML dayTimeDuration between 2 dates. Result will be negative if date1 > date2.- Parameters:
date1
- first (earlier) datedate2
- second (later) date- Returns:
- XML Duration
-
between
Compute XML dayTimeDuration between 2 dates. Result will be negative if date1 > date2.- Parameters:
date1
- first (earlier) datedate2
- second (later) date- Returns:
- XML Duration
-
between
Compute XML dayTimeDuration between 2 dates. Result will be negative if date1 > date2.- Parameters:
date1
- first (earlier) datedate2
- second (later) date- Returns:
- XML Duration
-
between
Compute XML dayTimeDuration between 2 dates. Result will be negative if date1 > date2.- Parameters:
date1
- first (earlier) datedate2
- second (later) date- Returns:
- XML Duration
-
between
Compute XML dayTimeDuration between 2 dates. Result will be negative if date1 > date2.- Parameters:
date1
- first (earlier) datedate2
- second (later) date- Returns:
- XML Duration
-