Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Business Rules
11g Release 1 (11.1.1)

E10663-03


oracle.rules.sdk2.extensions
Class OracleDuration

java.lang.Object
  extended by oracle.rules.rl.extensions.Duration
      extended by oracle.rules.sdk2.extensions.OracleDuration


public final class OracleDuration
extends Duration

Method Summary
static javax.xml.datatype.Duration between(java.util.Calendar date1, oracle.jbo.domain.Timestamp date2)
          Compute XML dayTimeDuration between 2 dates.
static javax.xml.datatype.Duration between(oracle.jbo.domain.Timestamp date1, java.util.Calendar date2)
          Compute XML dayTimeDuration between 2 dates.
static javax.xml.datatype.Duration between(oracle.jbo.domain.Timestamp date1, oracle.jbo.domain.Timestamp date2)
          Compute XML dayTimeDuration between 2 dates.
static javax.xml.datatype.Duration between(oracle.jbo.domain.Timestamp date1, javax.xml.datatype.XMLGregorianCalendar date2)
          Compute XML dayTimeDuration between 2 dates.
static javax.xml.datatype.Duration between(javax.xml.datatype.XMLGregorianCalendar date1, oracle.jbo.domain.Timestamp date2)
          Compute XML dayTimeDuration between 2 dates.
static int compare(java.util.Calendar cal1, oracle.jbo.domain.Timestamp ts2)
          Compares two dates and returns an int value of 0 if they are equal, less than 0 if cal1 represents a point in time before ts2, greater than 0 if cal1 represents a point in time after ts2.
static int compare(oracle.jbo.domain.Timestamp ts1, java.util.Calendar cal2)
          Compares two dates and returns an int value of 0 if they are equal, less than 0 if ts1 represents a point in time before cal2, greater than 0 if ts1 represents a point in time after cal2.
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 before ts2, greater than 0 if ts1 represents a point in time after ts2.
static int compare(oracle.jbo.domain.Timestamp ts1, javax.xml.datatype.XMLGregorianCalendar cal2)
          Compares two dates and returns an int value of 0 if they are equal, less than 0 if ts1 represents a point in time before cal2, greater than 0 if ts1 represents a point in time after cal2.
static int compare(javax.xml.datatype.XMLGregorianCalendar cal1, oracle.jbo.domain.Timestamp ts2)
          Compares two dates and returns an int value of 0 if they are equal, less than 0 if cal1 represents a point in time before ts2, greater than 0 if cal1 represents a point in time after ts2.
static int daysBetween(java.util.Calendar cal1, oracle.jbo.domain.Timestamp ts2)
          Returns the difference between the two dates in days.
static int daysBetween(oracle.jbo.domain.Timestamp ts1, java.util.Calendar 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 int daysBetween(oracle.jbo.domain.Timestamp ts1, javax.xml.datatype.XMLGregorianCalendar cal2)
          Returns the difference between the two dates in days.
static int daysBetween(javax.xml.datatype.XMLGregorianCalendar cal1, oracle.jbo.domain.Timestamp ts2)
          Returns the difference between the two dates in days.
static long hoursBetween(java.util.Calendar cal1, oracle.jbo.domain.Timestamp ts2)
          Returns the difference between the two dates in hours.
static long hoursBetween(oracle.jbo.domain.Timestamp ts1, java.util.Calendar 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 hoursBetween(oracle.jbo.domain.Timestamp ts1, javax.xml.datatype.XMLGregorianCalendar cal2)
          Returns the difference between the two dates in hours.
static long hoursBetween(javax.xml.datatype.XMLGregorianCalendar cal1, oracle.jbo.domain.Timestamp ts2)
          Returns the difference between the two dates in hours.
static long millisecondsBetween(java.util.Calendar cal1, oracle.jbo.domain.Timestamp ts2)
          Returns the difference between the two dates in milliseconds.
static long millisecondsBetween(oracle.jbo.domain.Timestamp ts1, java.util.Calendar 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 millisecondsBetween(oracle.jbo.domain.Timestamp ts1, javax.xml.datatype.XMLGregorianCalendar cal2)
          Returns the difference between the two dates in milliseconds.
static long millisecondsBetween(javax.xml.datatype.XMLGregorianCalendar cal1, oracle.jbo.domain.Timestamp ts2)
          Returns the difference between the two dates in milliseconds.
static long minutesBetween(java.util.Calendar cal1, oracle.jbo.domain.Timestamp ts2)
          Returns the difference between the two dates in minutes.
static long minutesBetween(oracle.jbo.domain.Timestamp ts1, java.util.Calendar 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 long minutesBetween(oracle.jbo.domain.Timestamp ts1, javax.xml.datatype.XMLGregorianCalendar cal2)
          Returns the difference between the two dates in minutes.
static long minutesBetween(javax.xml.datatype.XMLGregorianCalendar cal1, oracle.jbo.domain.Timestamp ts2)
          Returns the difference between the two dates in minutes.
static int monthsBetween(java.util.Calendar cal1, oracle.jbo.domain.Timestamp ts2)
          Returns the difference between the two dates in months.
static int monthsBetween(oracle.jbo.domain.Timestamp ts1, java.util.Calendar 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 int monthsBetween(oracle.jbo.domain.Timestamp ts1, javax.xml.datatype.XMLGregorianCalendar cal2)
          Returns the difference between the two dates in months.
static int monthsBetween(javax.xml.datatype.XMLGregorianCalendar cal1, oracle.jbo.domain.Timestamp ts2)
          Returns the difference between the two dates in months.
static long secondsBetween(java.util.Calendar cal1, oracle.jbo.domain.Timestamp ts2)
          Returns the difference between the two dates in seconds.
static long secondsBetween(oracle.jbo.domain.Timestamp ts1, java.util.Calendar 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 long secondsBetween(oracle.jbo.domain.Timestamp ts1, javax.xml.datatype.XMLGregorianCalendar cal2)
          Returns the difference between the two dates in seconds.
static long secondsBetween(javax.xml.datatype.XMLGregorianCalendar cal1, oracle.jbo.domain.Timestamp ts2)
          Returns the difference between the two dates in seconds.
static int weeksBetween(java.util.Calendar cal1, oracle.jbo.domain.Timestamp ts2)
          Returns the difference between the two dates in weeks.
static int weeksBetween(oracle.jbo.domain.Timestamp ts1, java.util.Calendar 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 weeksBetween(oracle.jbo.domain.Timestamp ts1, javax.xml.datatype.XMLGregorianCalendar cal2)
          Returns the difference between the two dates in weeks.
static int weeksBetween(javax.xml.datatype.XMLGregorianCalendar cal1, oracle.jbo.domain.Timestamp ts2)
          Returns the difference between the two dates in weeks.
static int yearsBetween(java.util.Calendar cal1, oracle.jbo.domain.Timestamp ts2)
          Returns the difference between the two dates in years.
static int yearsBetween(oracle.jbo.domain.Timestamp ts1, java.util.Calendar 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.
static int yearsBetween(oracle.jbo.domain.Timestamp ts1, javax.xml.datatype.XMLGregorianCalendar cal2)
          Returns the difference between the two dates in years.
static int yearsBetween(javax.xml.datatype.XMLGregorianCalendar cal1, 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, ratio, secondsBetween, secondsBetween, secondsBetween, secondsBetween, weeksBetween, weeksBetween, weeksBetween, weeksBetween, yearsBetween, yearsBetween, yearsBetween, yearsBetween

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

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 and ts2 are converted to instances of GregorianCalendar before the difference is calculated.
Parameters:
ts1 - the starting Timestamp instance
ts2 - the ending Timestamp instance
Returns:
the number of years between the ts1 and ts2.
Throws:
java.lang.NullPointerException - if either ts1 or ts2 is null.

yearsBetween

public static int yearsBetween(oracle.jbo.domain.Timestamp ts1,
                               java.util.Calendar cal2)
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 of GregorianCalendar before the difference is calculated.
Parameters:
ts1 - the starting Timestamp instance
cal2 - the ending Calendar instance
Returns:
the number of years between the ts1 and cal2.
Throws:
java.lang.NullPointerException - if either ts1 or cal2 is null.

yearsBetween

public static int yearsBetween(java.util.Calendar cal1,
                               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. date2 is converted to an instance of GregorianCalendar before the difference is calculated.
Parameters:
cal1 - the starting Calendar instance
ts2 - the ending Timestamp instance
Returns:
the number of years between the cal1 the ts2.
Throws:
java.lang.NullPointerException - if either cal1 or ts2 is null.

yearsBetween

public static int yearsBetween(oracle.jbo.domain.Timestamp ts1,
                               javax.xml.datatype.XMLGregorianCalendar cal2)
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 and date2 are converted to GregorianCalendar before the difference is calculated.
Parameters:
ts1 - the starting Timestamp instance
cal2 - the ending XMLGregorianCalendar instance
Returns:
the number of years between the date1 and date2.
Throws:
java.lang.NullPointerException - if either ts1 or cal2 is null.

yearsBetween

public static int yearsBetween(javax.xml.datatype.XMLGregorianCalendar cal1,
                               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. date1 and date2 are converted to GregorianCalendar before the difference is calculated.
Parameters:
cal1 - the starting XMLGregorianCalendar instance
ts2 - the ending Timestamp instance
Returns:
the number of years between the cal1 the ts2.
Throws:
java.lang.NullPointerException - if either cal1 or ts2 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 instance
ts2 - the ending Timestamp instance
Returns:
the number of months between the ts1 and ts2.
Throws:
java.lang.NullPointerException - if either ts1 or ts2 is null.

monthsBetween

public static int monthsBetween(java.util.Calendar cal1,
                                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:
cal1 - the starting Calendar instance
ts2 - the ending Timestamp instance
Returns:
the number of months between the cal1 the ts2.
Throws:
java.lang.NullPointerException - if either cal1 or ts2 is null.

monthsBetween

public static int monthsBetween(oracle.jbo.domain.Timestamp ts1,
                                java.util.Calendar cal2)
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 instance
cal2 - the ending Calendar instance
Returns:
the number of months between the ts1 and cal2.
Throws:
java.lang.NullPointerException - if either ts1 or cal2 is null.

monthsBetween

public static int monthsBetween(javax.xml.datatype.XMLGregorianCalendar cal1,
                                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:
cal1 - the starting XMLGregorianCalendar instance
ts2 - the ending Timestamp instance
Returns:
the number of months between the cal1 the ts2.
Throws:
java.lang.NullPointerException - if either cal1 or ts2 is null.

monthsBetween

public static int monthsBetween(oracle.jbo.domain.Timestamp ts1,
                                javax.xml.datatype.XMLGregorianCalendar cal2)
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 instance
cal2 - the ending XMLGregorianCalendar instance
Returns:
the number of months between the ts1 and cal2.
Throws:
java.lang.NullPointerException - if either ts1 or cal2 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 and ts2 are converted to GregorianCalendar before the difference is calculated.
Parameters:
ts1 - the starting Timestamp instance
ts2 - the ending Timestamp instance
Returns:
the number of weeks between the ts1 and ts2.
Throws:
java.lang.NullPointerException - if either ts1 or ts2 is null.

weeksBetween

public static int weeksBetween(oracle.jbo.domain.Timestamp ts1,
                               java.util.Calendar cal2)
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 and cal2 are converted to GregorianCalendar before the difference is calculated.
Parameters:
ts1 - the starting Timestamp instance
cal2 - the ending Calendar instance
Returns:
the number of weeks between the ts1 and cal2.
Throws:
java.lang.NullPointerException - if either ts1 or cal2 is null.

weeksBetween

public static int weeksBetween(java.util.Calendar cal1,
                               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. cal1 and ts2 are converted to GregorianCalendar before the difference is calculated.
Parameters:
cal1 - the starting Calendar instance
ts2 - the ending Timestamp instance
Returns:
the number of weeks between the cal1 the ts2.
Throws:
java.lang.NullPointerException - if either cal1 or ts2 is null.

weeksBetween

public static int weeksBetween(oracle.jbo.domain.Timestamp ts1,
                               javax.xml.datatype.XMLGregorianCalendar cal2)
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 and cal2 are converted to GregorianCalendar before the difference is calculated.
Parameters:
ts1 - the starting Timestamp instance
cal2 - the ending XMLGregorianCalendar instance
Returns:
the number of weeks between the ts1 and cal2.
Throws:
java.lang.NullPointerException - if either ts1 or cal2 is null.

weeksBetween

public static int weeksBetween(javax.xml.datatype.XMLGregorianCalendar cal1,
                               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. cal1 and ts2 are converted to GregorianCalendar before the difference is calculated.
Parameters:
cal1 - the starting XMLGregorianCalendar instance
ts2 - the ending Timestamp instance
Returns:
the number of weeks between the cal1 the ts2.
Throws:
java.lang.NullPointerException - if either cal1 or ts2 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 and ts2 are converted to GregorianCalendar before the difference is calculated.
Parameters:
ts1 - the starting Timestamp instance
ts2 - the ending Timestamp instance
Returns:
the number of weeks between the ts1 and ts2.
Throws:
java.lang.NullPointerException - if either ts1 or ts2 is null.

daysBetween

public static int daysBetween(java.util.Calendar cal1,
                              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. cal1 and ts2 are converted to GregorianCalendar before the difference is calculated.
Parameters:
cal1 - the starting Calendar instance
ts2 - the ending Timestamp instance
Returns:
the number of weeks between the cal1 the ts2.
Throws:
java.lang.NullPointerException - if either cal1 or ts2 is null.

daysBetween

public static int daysBetween(oracle.jbo.domain.Timestamp ts1,
                              java.util.Calendar cal2)
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 and cal2 are converted to GregorianCalendar before the difference is calculated.
Parameters:
ts1 - the starting Timestamp instance
cal2 - the ending Calendar instance
Returns:
the number of weeks between the ts1 and cal2.
Throws:
java.lang.NullPointerException - if either ts1 or cal2 is null.

daysBetween

public static int daysBetween(javax.xml.datatype.XMLGregorianCalendar cal1,
                              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. cal1 and ts2 are converted to GregorianCalendar before the difference is calculated.
Parameters:
cal1 - the starting XMLGregorianCalendar instance
ts2 - the ending Timestamp instance
Returns:
the number of weeks between the cal1 the ts2.
Throws:
java.lang.NullPointerException - if either cal1 or ts2 is null.

daysBetween

public static int daysBetween(oracle.jbo.domain.Timestamp ts1,
                              javax.xml.datatype.XMLGregorianCalendar cal2)
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 and cal2 are converted to GregorianCalendar before the difference is calculated.
Parameters:
ts1 - the starting Timestamp instance
cal2 - the ending Calendar instance
Returns:
the number of weeks between the ts1 and cal2.
Throws:
java.lang.NullPointerException - if either ts1 or cal2 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 instance
ts2 - the ending Timestamp instance
Returns:
the number of hours between the ts1 and ts2.
Throws:
java.lang.NullPointerException - if either ts1 or ts2 is null.

hoursBetween

public static long hoursBetween(oracle.jbo.domain.Timestamp ts1,
                                java.util.Calendar cal2)
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 instance
cal2 - the ending Calendar instance
Returns:
the number of hours between the ts1 and cal2.
Throws:
java.lang.NullPointerException - if either ts1 or cal2 is null.

hoursBetween

public static long hoursBetween(java.util.Calendar cal1,
                                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:
cal1 - the starting Calendar instance
ts2 - the ending Timestamp instance
Returns:
the number of hours between the cal1 the ts2.
Throws:
java.lang.NullPointerException - if either cal1 or ts2 is null.

hoursBetween

public static long hoursBetween(oracle.jbo.domain.Timestamp ts1,
                                javax.xml.datatype.XMLGregorianCalendar cal2)
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 instance
cal2 - the ending Calendar instance
Returns:
the number of hours between the ts1 and cal2.
Throws:
java.lang.NullPointerException - if either ts1 or cal2 is null.

hoursBetween

public static long hoursBetween(javax.xml.datatype.XMLGregorianCalendar cal1,
                                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:
cal1 - the starting XMLGregorianCalendar instance
ts2 - the ending Timestamp instance
Returns:
the number of hours between the cal1 the ts2.
Throws:
java.lang.NullPointerException - if either cal1 or ts2 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 instance
ts2 - the ending Timestamp instance
Returns:
the number of minutes between the ts1 and ts2.
Throws:
java.lang.NullPointerException - if either ts1 or ts2 is null.

minutesBetween

public static long minutesBetween(oracle.jbo.domain.Timestamp ts1,
                                  java.util.Calendar cal2)
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 instance
cal2 - the ending Calendar instance
Returns:
the number of minutes between the ts1 and cal2.
Throws:
java.lang.NullPointerException - if either ts1 or cal2 is null.

minutesBetween

public static long minutesBetween(java.util.Calendar cal1,
                                  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:
cal1 - the starting Calendar instance
ts2 - the ending Timestamp instance
Returns:
the number of minutes between the cal1 the ts2.
Throws:
java.lang.NullPointerException - if either cal1 or ts2 is null.

minutesBetween

public static long minutesBetween(oracle.jbo.domain.Timestamp ts1,
                                  javax.xml.datatype.XMLGregorianCalendar cal2)
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 instance
cal2 - the ending Calendar instance
Returns:
the number of minutes between the ts1 and cal2.
Throws:
java.lang.NullPointerException - if either ts1 or cal2 is null.

minutesBetween

public static long minutesBetween(javax.xml.datatype.XMLGregorianCalendar cal1,
                                  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:
cal1 - the starting XMLGregorianCalendar instance
ts2 - the ending Timestamp instance
Returns:
the number of minutes between the cal1 the ts2.
Throws:
java.lang.NullPointerException - if either cal1 or ts2 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 instance
ts2 - the ending Timestamp instance
Returns:
the number of seconds between the ts1 and ts2.
Throws:
java.lang.NullPointerException - if either ts1 or ts2 is null.

secondsBetween

public static long secondsBetween(oracle.jbo.domain.Timestamp ts1,
                                  java.util.Calendar cal2)
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 instance
cal2 - the ending Calendar instance
Returns:
the number of seconds between the ts1 and cal2.
Throws:
java.lang.NullPointerException - if either ts1 or cal2 is null.

secondsBetween

public static long secondsBetween(java.util.Calendar cal1,
                                  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:
cal1 - the starting Calendar instance
ts2 - the ending Timestamp instance
Returns:
the number of seconds between the cal1 the ts2.
Throws:
java.lang.NullPointerException - if either cal1 or ts2 is null.

secondsBetween

public static long secondsBetween(oracle.jbo.domain.Timestamp ts1,
                                  javax.xml.datatype.XMLGregorianCalendar cal2)
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 instance
cal2 - the ending Calendar instance
Returns:
the number of seconds between the ts1 and cal2.
Throws:
java.lang.NullPointerException - if either ts1 or cal2 is null.

secondsBetween

public static long secondsBetween(javax.xml.datatype.XMLGregorianCalendar cal1,
                                  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:
cal1 - the starting XMLGregorianCalendar instance
ts2 - the ending Timestamp instance
Returns:
the number of seconds between the cal1 the ts2.
Throws:
java.lang.NullPointerException - if either cal1 or ts2 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 instance
ts2 - the ending Timestamp instance
Returns:
the number of milliseconds between the ts1 and ts2.
Throws:
java.lang.NullPointerException - if either ts1 or ts2 is null.

millisecondsBetween

public static long millisecondsBetween(java.util.Calendar cal1,
                                       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:
cal1 - the starting Calendar instance
ts2 - the ending Timestamp instance
Returns:
the number of milliseconds between the cal1 the ts2.
Throws:
java.lang.NullPointerException - if either cal1 or ts2 is null.

millisecondsBetween

public static long millisecondsBetween(oracle.jbo.domain.Timestamp ts1,
                                       java.util.Calendar cal2)
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 instance
cal2 - the ending Calendar instance
Returns:
the number of milliseconds between the ts1 and cal2.
Throws:
java.lang.NullPointerException - if either ts1 or cal2 is null.

millisecondsBetween

public static long millisecondsBetween(javax.xml.datatype.XMLGregorianCalendar cal1,
                                       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:
cal1 - the starting XMLGregorianCalendar instance
ts2 - the ending Timestamp instance
Returns:
the number of milliseconds between the cal1 the ts2.
Throws:
java.lang.NullPointerException - if either cal1 or ts2 is null.

millisecondsBetween

public static long millisecondsBetween(oracle.jbo.domain.Timestamp ts1,
                                       javax.xml.datatype.XMLGregorianCalendar cal2)
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 instance
cal2 - the ending XMLGregorianCalendar instance
Returns:
the number of milliseconds between the ts1 and cal2.
Throws:
java.lang.NullPointerException - if either ts1 or cal2 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
Parameters:
ts1 - the left-hand side Timestamp instance
ts2 - the right-hand side Timestamp instance
Returns:
the relative comparison result.

compare

public static int compare(oracle.jbo.domain.Timestamp ts1,
                          java.util.Calendar cal2)
Compares two dates and returns an int value
Parameters:
ts1 - the left-hand side Timestamp instance
cal2 - the right-hand side Calendar instance
Returns:
the relative comparison result.

compare

public static int compare(java.util.Calendar cal1,
                          oracle.jbo.domain.Timestamp ts2)
Compares two dates and returns an int value
Parameters:
cal1 - the left-hand side Calendar instance
ts2 - the right-hand side Timestamp instance
Returns:
the relative comparison result.

compare

public static int compare(oracle.jbo.domain.Timestamp ts1,
                          javax.xml.datatype.XMLGregorianCalendar cal2)
Compares two dates and returns an int value
Parameters:
ts1 - the left-hand side Timestamp instance
cal2 - the right-hand side XMLGregorianCalendar instance
Returns:
the relative comparison result.

compare

public static int compare(javax.xml.datatype.XMLGregorianCalendar cal1,
                          oracle.jbo.domain.Timestamp ts2)
Compares two dates and returns an int value
Parameters:
cal1 - the left-hand side XMLGregorianCalendar instance
ts2 - the right-hand side Timestamp instance
Returns:
the relative comparison result.

between

public static javax.xml.datatype.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) date
date2 - second (later) date
Returns:
XML Duration

between

public static javax.xml.datatype.Duration between(oracle.jbo.domain.Timestamp date1,
                                                  java.util.Calendar date2)
Compute XML dayTimeDuration between 2 dates. Result will be negative if date1 > date2.
Parameters:
date1 - first (earlier) date
date2 - second (later) date
Returns:
XML Duration

between

public static javax.xml.datatype.Duration between(java.util.Calendar date1,
                                                  oracle.jbo.domain.Timestamp date2)
Compute XML dayTimeDuration between 2 dates. Result will be negative if date1 > date2.
Parameters:
date1 - first (earlier) date
date2 - second (later) date
Returns:
XML Duration

between

public static javax.xml.datatype.Duration between(oracle.jbo.domain.Timestamp date1,
                                                  javax.xml.datatype.XMLGregorianCalendar date2)
Compute XML dayTimeDuration between 2 dates. Result will be negative if date1 > date2.
Parameters:
date1 - first (earlier) date
date2 - second (later) date
Returns:
XML Duration

between

public static javax.xml.datatype.Duration between(javax.xml.datatype.XMLGregorianCalendar date1,
                                                  oracle.jbo.domain.Timestamp date2)
Compute XML dayTimeDuration between 2 dates. Result will be negative if date1 > date2.
Parameters:
date1 - first (earlier) date
date2 - second (later) date
Returns:
XML Duration

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Business Rules
11g Release 1 (11.1.1)

E10663-03


Copyright © 2010, Oracle and/or its affiliates. All rights reserved.