JavaScript API for Oracle type DATE.

Hierarchy

  • IOracleDate

Constructors

  • Construct a new IOracleDate object from date and time components (Gregorian calendar).

    Parameters

    • year: number

      year component (-4712 <= y <= 9999)

    • month: number

      month component (1 <= m <= 12)

    • day: number

      day component (1 <= d <= 31)

    • hour: number

      hour component (0 <= h <= 23)

    • minute: number

      minute component (0 <= m <= 59)

    • second: number

      second component (0 <= s <= 59)

    Returns IOracleDate

  • Construct a new IOracleDate object from date components (Gregorian calendar).

    Parameters

    • year: number

      year component (-4712 <= y <= 9999)

    • month: number

      month component (1 <= m <= 12)

    • day: number

      day component (1 <= d <= 31)

    Returns IOracleDate

Methods

  • Construct a new IOracleDate object by adding number of days to this date. The result of this function is sensitive to the setting for the NLS_CALENDAR parameter in the current session.

    Returns

    the new date as IOracleDate object

    Parameters

    • numberOfDays: number

      number of days to add

    Returns IOracleDate

  • Construct a new IOracleDate object by adding number of months to this date. The result of this function is sensitive to the setting for the NLS_CALENDAR parameter in the current session.

    Returns

    the new date as IOracleDate object

    Parameters

    • numberOfMonths: number

      number of months to add

    Returns IOracleDate

  • Gets the number of days between two dates. The result of this function is sensitive to the setting for the NLS_CALENDAR parameter in the current session.

    Returns

    number of days between d1 and d2

    Parameters

    Returns number

  • Parse a date string into an IOracleDate. An optional datetime format model and an optional NLS parameter string can be provided. If no format model and/or no NLS parameter string is provided, the respective default values for the session are used.

    If an NLS parameter string is specified, it has the effect of temporarily altering the session's NLS settings for the duration of the call to this method. The NLS parameter string may only set the NLS_DATE_LANGUAGE parameter.

    If a datetime format model is specified, it overrides the date format determined by NLS settings.

    Returns

    the new date as IOracleDate object

    Parameters

    • date: string

      date represented as a string

    • Optional fmt: string

      optional datetime format model

    • Optional nlsParam: string

      optional NLS parameter string. Must have the same format as the NLS argument to the TO_DATE SQL function.

    Returns IOracleDate

  • Gets the day component according to the Gregorian calendar.

    Returns

    day component (1 <= d <= 31)

    Returns number

  • Gets the hour component.

    Returns

    our component (0 <= h <= 23)

    Returns number

  • Gets the minute component.

    Returns

    minute component (0 <= m <= 59)

    Returns number

  • Gets the month component according to the Gregorian calendar.

    Returns

    month component (1 <= m <= 12)

    Returns number

  • Gets the second component.

    Returns

    second component (0 <= s <= 59)

    Returns number

  • Gets the year component according to the Gregorian calendar.

    Returns

    year component (-4712 <= y <= 9999)

    Returns number

  • Checks if this has a valid date.

    Returns

    true iff the date is valid

    Returns boolean

  • Gets the date of the last day of the month specified by this date. The result of this function is sensitive to the setting for the NLS_CALENDAR parameter of the current session.

    Returns

    a new date set set to the last day of the month

    Returns IOracleDate

  • Gets the date of the first weekday named by dayOfTheWeek that is later than this date. The result of this method is sensitive to the NLS_DATE_LANGUAGE parameter of the current session.

    Returns

    a new date set to the first weekday name by dayOfTheWeek that is later than this date.

    Parameters

    • dayOfTheWeek: string

    Returns IOracleDate

  • Gets the current system date and time as an IOracleDate.

    Returns

    the system date and time as IOracleDate

    Returns IOracleDate

  • Converts an IOracleDate to a string and returns it. An optional datetime format model and an optional NLS parameter string can be provided. If no format model and/or no NLS parameter string is provided, the respective default values for the session are used.

    If an NLS parameter string is specified, it has the effect of temporarily altering the session's NLS settings for the duration of the call to this method. The NLS parameter string may only set the NLS_DATE_LANGUAGE parameter.

    If a datetime format model is specified, it overrides the date format determined by NLS settings.

    Returns

    the date as string

    Parameters

    • Optional fmt: string

      optional datetime format model

    • Optional nlsParam: string

      optional NLS parameter string. Must have the same format as the NLS argument to the TO_DATE SQL function.

    Returns string