Skip navigation links

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

E10663-01


oracle.rules.rl.extensions
Class JavaDate

java.lang.Object
  extended by oracle.rules.rl.extensions.JavaDate


public class JavaDate
extends java.lang.Object

Constructor Summary
JavaDate()
           

 

Method Summary
static java.util.Calendar addDaysTo(java.util.Calendar date, int days)
          Returns a new Calendar that is the result of adding the specified number of days to the specified date.
static java.util.Calendar addHoursTo(java.util.Calendar date, long hours)
          Returns a new Calendar that is the result of adding the specified number of hours to the specified date.
static java.util.Calendar addMillisecondsTo(java.util.Calendar date, long milliseconds)
          Returns a new Calendar that is the result of adding the specified number of milliseconds to the specified date.
static java.util.Calendar addMinutesTo(java.util.Calendar date, long minutes)
          Returns a new Calendar that is the result of adding the specified number of minutes to the specified date.
static java.util.Calendar addMonthsTo(java.util.Calendar date, int months)
          Returns a new Calendar that is the result of adding the specified number of months to the specified date.
static java.util.Calendar addSecondsTo(java.util.Calendar date, long seconds)
          Returns a new Calendar that is the result of adding the specified number of seconds to the specified date.
static java.util.Calendar addWeeksTo(java.util.Calendar date, int weeks)
          Returns a new Calendar that is the result of adding the specified number of weeks to the specified date.
static java.util.Calendar addYearsTo(java.util.Calendar date, int years)
          Returns a new Calendar that is the result of adding the specified number of years to the specified date.
static java.util.Calendar fromDateString(java.lang.String dateString)
          Creates a Calendar instance for the specified ISO 8601 date.
static java.util.Calendar fromDateTimeString(java.lang.String datetimeString)
          Creates a Calendar instance for the specified ISO 8601 date and time.
static java.util.Calendar fromTimeString(java.lang.String timeString)
          Creates a Calendar instance for the specified ISO 8601 time.
static java.util.Calendar subtractDaysFrom(java.util.Calendar date, int days)
          Returns a new Calendar that is the result of subtracting the specified number of days from the specified date.
static java.util.Calendar subtractHoursFrom(java.util.Calendar date, long hours)
          Returns a new Calendar that is the result of subtracting the specified number of hours from the specified date.
static java.util.Calendar subtractMillisecondsFrom(java.util.Calendar date, long milliseconds)
          Returns a new Calendar that is the result of subtracting the specified number of milliseconds from the specified date.
static java.util.Calendar subtractMinutesFrom(java.util.Calendar date, long minutes)
          Returns a new Calendar that is the result of subtracting the specified number of minutes from the specified date.
static java.util.Calendar subtractMonthsFrom(java.util.Calendar date, int months)
          Returns a new Calendar that is the result of subtracting the specified number of months from the date.
static java.util.Calendar subtractSecondsFrom(java.util.Calendar date, long seconds)
          Returns a new Calendar that is the result of subtracting the specified number of seconds from the specified date.
static java.util.Calendar subtractWeeksFrom(java.util.Calendar date, int weeks)
          Returns a new Calendar that is the result of subtracting the specified number of weeks from the specified date.
static java.util.Calendar subtractYearsFrom(java.util.Calendar date, int years)
          Returns a new Calendar that is the result of subtracting the specified number of years from the specified date.
static java.lang.String toDateString(java.util.Calendar date)
          Return the ISO 8601 representation of the specified date.
static java.lang.String toDateTimeString(java.util.Calendar date)
          Return the ISO 8601 representation of the specified date and time.
static java.lang.String toTimeString(java.util.Calendar time)
          Return the ISO 8601 representation of the specified time.

 

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

 

Constructor Detail

JavaDate

public JavaDate()

Method Detail

addYearsTo

public static java.util.Calendar addYearsTo(java.util.Calendar date,
                                            int years)
Returns a new Calendar that is the result of adding the specified number of years to the specified date.
Parameters:
date -
years -
Returns:
a new Calendar that is the result of adding the specified number of years to the specified date.
Throws:
java.lang.NullPointerException - if the date parameter is null.

addMonthsTo

public static java.util.Calendar addMonthsTo(java.util.Calendar date,
                                             int months)
Returns a new Calendar that is the result of adding the specified number of months to the specified date.
Parameters:
date -
months -
Returns:
a new Calendar that is the result of adding the specified number of months to the specified date.
Throws:
java.lang.NullPointerException - if the date parameter is null.

addWeeksTo

public static java.util.Calendar addWeeksTo(java.util.Calendar date,
                                            int weeks)
Returns a new Calendar that is the result of adding the specified number of weeks to the specified date.
Parameters:
date -
weeks -
Returns:
a new Calendar that is the result of adding the specified number of weeks to the specified date.
Throws:
java.lang.NullPointerException - if the date parameter is null.

addDaysTo

public static java.util.Calendar addDaysTo(java.util.Calendar date,
                                           int days)
Returns a new Calendar that is the result of adding the specified number of days to the specified date.
Parameters:
date -
days -
Returns:
a new Calendar that is the result of adding the specified number of days to the specified date.
Throws:
java.lang.NullPointerException - if the date parameter is null.

addHoursTo

public static java.util.Calendar addHoursTo(java.util.Calendar date,
                                            long hours)
Returns a new Calendar that is the result of adding the specified number of hours to the specified date.
Parameters:
date -
hours -
Returns:
a new Calendar that is the result of adding the specified number of hours to the specified date.
Throws:
java.lang.NullPointerException - if the date parameter is null.

addMinutesTo

public static java.util.Calendar addMinutesTo(java.util.Calendar date,
                                              long minutes)
Returns a new Calendar that is the result of adding the specified number of minutes to the specified date.
Parameters:
date -
minutes -
Returns:
a new Calendar that is the result of adding the specified number of minutes to the specified date.
Throws:
java.lang.NullPointerException - if the date parameter is null.

addSecondsTo

public static java.util.Calendar addSecondsTo(java.util.Calendar date,
                                              long seconds)
Returns a new Calendar that is the result of adding the specified number of seconds to the specified date.
Parameters:
date -
seconds -
Returns:
a new Calendar that is the result of adding the specified number of seconds to the specified date.
Throws:
java.lang.NullPointerException - if the date parameter is null.

addMillisecondsTo

public static java.util.Calendar addMillisecondsTo(java.util.Calendar date,
                                                   long milliseconds)
Returns a new Calendar that is the result of adding the specified number of milliseconds to the specified date.
Parameters:
date -
milliseconds -
Returns:
a new Calendar that is the result of adding the specified number of milliseconds to the specified date.
Throws:
java.lang.NullPointerException - if the date parameter is null.

subtractYearsFrom

public static java.util.Calendar subtractYearsFrom(java.util.Calendar date,
                                                   int years)
Returns a new Calendar that is the result of subtracting the specified number of years from the specified date.
Parameters:
date -
years -
Returns:
a new Calendar that is the result of subtracting the specified number of years from the specified date.
Throws:
java.lang.NullPointerException - if the date parameter is null.

subtractMonthsFrom

public static java.util.Calendar subtractMonthsFrom(java.util.Calendar date,
                                                    int months)
Returns a new Calendar that is the result of subtracting the specified number of months from the date.
Parameters:
date -
months -
Returns:
a new Calendar that is the result of subtracting the specified number of months from the specified date.
Throws:
java.lang.NullPointerException - if the date parameter is null.

subtractWeeksFrom

public static java.util.Calendar subtractWeeksFrom(java.util.Calendar date,
                                                   int weeks)
Returns a new Calendar that is the result of subtracting the specified number of weeks from the specified date.
Parameters:
date -
weeks -
Returns:
a new Calendar that is the result of subtracting the specified number of weeks from the specified date.
Throws:
java.lang.NullPointerException - if the date parameter is null.

subtractDaysFrom

public static java.util.Calendar subtractDaysFrom(java.util.Calendar date,
                                                  int days)
Returns a new Calendar that is the result of subtracting the specified number of days from the specified date.
Parameters:
date -
days -
Returns:
a new Calendar that is the result of subtracting the specified number of days from the specified date.
Throws:
java.lang.NullPointerException - if the date parameter is null.

subtractHoursFrom

public static java.util.Calendar subtractHoursFrom(java.util.Calendar date,
                                                   long hours)
Returns a new Calendar that is the result of subtracting the specified number of hours from the specified date.
Parameters:
date -
hours -
Returns:
a new Calendar that is the result of subtracting the specified number of hours from the specified date.
Throws:
java.lang.NullPointerException - if the date parameter is null.

subtractMinutesFrom

public static java.util.Calendar subtractMinutesFrom(java.util.Calendar date,
                                                     long minutes)
Returns a new Calendar that is the result of subtracting the specified number of minutes from the specified date.
Parameters:
date -
minutes -
Returns:
a new Calendar that is the result of subtracting the specified number of minutes from the specified date.
Throws:
java.lang.NullPointerException - if the date parameter is null.

subtractSecondsFrom

public static java.util.Calendar subtractSecondsFrom(java.util.Calendar date,
                                                     long seconds)
Returns a new Calendar that is the result of subtracting the specified number of seconds from the specified date.
Parameters:
date -
seconds -
Returns:
a new Calendar that is the result of subtracting the specified number of seconds from the specified date.
Throws:
java.lang.NullPointerException - if the date parameter is null.

subtractMillisecondsFrom

public static java.util.Calendar subtractMillisecondsFrom(java.util.Calendar date,
                                                          long milliseconds)
Returns a new Calendar that is the result of subtracting the specified number of milliseconds from the specified date.
Parameters:
date -
milliseconds -
Returns:
a new Calendar that is the result of subtracting the specified number of milliseconds from the specified date.
Throws:
java.lang.NullPointerException - if the date parameter is null.

fromDateString

public static java.util.Calendar fromDateString(java.lang.String dateString)
                                         throws java.lang.IllegalArgumentException
Creates a Calendar instance for the specified ISO 8601 date.
Parameters:
dateString - the ISO 8601 representation of a date.
Returns:
a Calendar instance for the specified date.
Throws:
java.lang.IllegalArgumentException - if an error occurs parsing the date string.

fromTimeString

public static java.util.Calendar fromTimeString(java.lang.String timeString)
                                         throws java.lang.IllegalArgumentException
Creates a Calendar instance for the specified ISO 8601 time. Warning: a Calendar cannot represent a time without a date. The returned Calendar will be initialized with the current date.
Parameters:
timeString - the ISO 8601 representation of a point in time.
Returns:
a Calendar instance for the specified date and time.
Throws:
java.lang.IllegalArgumentException - if an error occurs parsing the date string.

fromDateTimeString

public static java.util.Calendar fromDateTimeString(java.lang.String datetimeString)
                                             throws java.lang.IllegalArgumentException
Creates a Calendar instance for the specified ISO 8601 date and time.
Parameters:
datetimeString - the ISO 8601 representation of a date and time.
Returns:
a Calendar instance for the specified date and time.
Throws:
java.lang.IllegalArgumentException - if an error occurs parsing the date string.

toDateString

public static java.lang.String toDateString(java.util.Calendar date)
Return the ISO 8601 representation of the specified date.
Parameters:
date - the date to format.
Returns:
the ISO 8601 representation

toDateTimeString

public static java.lang.String toDateTimeString(java.util.Calendar date)
Return the ISO 8601 representation of the specified date and time.
Parameters:
date - the date/time to format.
Returns:
the ISO 8601 representation

toTimeString

public static java.lang.String toTimeString(java.util.Calendar time)
Return the ISO 8601 representation of the specified time.
Parameters:
time - the time to format.
Returns:
the ISO 8601 representation

Skip navigation links

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

E10663-01


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