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

E10663-11

oracle.rules.sdk2.extensions
Class OracleDate

java.lang.Object
  extended by oracle.rules.sdk2.extensions.OracleDate

public final class OracleDate
extends java.lang.Object


Method Summary
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.
static oracle.jbo.domain.Timestamp addDurationTo(oracle.jbo.domain.Timestamp ts, javax.xml.datatype.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.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.
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.
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.
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.
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.
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.
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.
static oracle.jbo.domain.Timestamp fromString(java.lang.String str)
          Creates a Timestamp instance for the specified ISO 8601 date and time string.
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.
static oracle.jbo.domain.Timestamp subtractDurationFrom(oracle.jbo.domain.Timestamp ts, javax.xml.datatype.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.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.
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.
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.
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.
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.
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.
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.
static java.util.GregorianCalendar toGregorianCalendar(oracle.jbo.domain.Timestamp ts)
          Return a GregorianCalendar representing the specified Timestamp
static java.lang.String toString(oracle.jbo.domain.Timestamp ts)
          Return the ISO 8601 representation of the specified Timestamp instance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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 instance
years - 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:
java.lang.NullPointerException - if the timestamp parameter is null.

addDurationTo

public static oracle.jbo.domain.Timestamp addDurationTo(oracle.jbo.domain.Timestamp ts,
                                                        javax.xml.datatype.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 instance
duration -
Returns:
a new Timestamp that is the result of adding the specified duration to the specified Timestamp instance.
Throws:
java.lang.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 instance
months - 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:
java.lang.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 instance
weeks - 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:
java.lang.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 instance
days - 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:
java.lang.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 instance
hours - 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:
java.lang.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 instance
minutes - 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:
java.lang.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 instance
seconds - 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:
java.lang.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 instance
milliseconds - 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:
java.lang.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 instance
years - 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:
java.lang.NullPointerException - if the Timestamp parameter is null.

subtractDurationFrom

public static oracle.jbo.domain.Timestamp subtractDurationFrom(oracle.jbo.domain.Timestamp ts,
                                                               javax.xml.datatype.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 instance
duration -
Returns:
a new Timestamp instance that is the result of subtracting the specified duration from the specified Timestamp instance.
Throws:
java.lang.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 instance
months - 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:
java.lang.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 instance
weeks - 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:
java.lang.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 instance
days - 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:
java.lang.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 instance
hours - 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:
java.lang.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 instance
minutes - 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:
java.lang.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 instance
seconds - 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:
java.lang.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 instance
milliseconds - 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:
java.lang.NullPointerException - if the Timestamp parameter is null.

fromString

public static oracle.jbo.domain.Timestamp fromString(java.lang.String str)
                                              throws java.lang.IllegalArgumentException
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:
java.lang.IllegalArgumentException - if an error occurs parsing the date string

toString

public static java.lang.String toString(oracle.jbo.domain.Timestamp ts)
Return the ISO 8601 representation of the specified Timestamp instance.

Parameters:
ts - the Timestamp instance to format
Returns:
the ISO 8601 representation

toGregorianCalendar

public static java.util.GregorianCalendar toGregorianCalendar(oracle.jbo.domain.Timestamp ts)
Return a GregorianCalendar representing the specified Timestamp

Parameters:
ts - the Timestamp instance to convert
Returns:
the new calendar instance

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

E10663-11

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