MLE PL/SQL Types(mle-js-plsqltypes)
    Preparing search index...

    Class IOracleDate

    JavaScript API for Oracle type DATE.

    Index

    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.

      Parameters

      • numberOfDays: number

        number of days to add

      Returns IOracleDate

      the new date as IOracleDate object

    • 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.

      Parameters

      • numberOfMonths: number

        number of months to add

      Returns IOracleDate

      the new date as IOracleDate object

    • Gets the day component according to the Gregorian calendar.

      Returns number

      day component (1 <= d <= 31)

    • Gets the hour component.

      Returns number

      our component (0 <= h <= 23)

    • Gets the minute component.

      Returns number

      minute component (0 <= m <= 59)

    • Gets the month component according to the Gregorian calendar.

      Returns number

      month component (1 <= m <= 12)

    • Gets the second component.

      Returns number

      second component (0 <= s <= 59)

    • Gets the year component according to the Gregorian calendar.

      Returns number

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

    • Checks if this has a valid date.

      Returns boolean

      true iff the date is valid

    • 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 IOracleDate

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

    • 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.

      Parameters

      • dayOfTheWeek: string

      Returns IOracleDate

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

    • 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.

      Parameters

      • Optionalfmt: string

        optional datetime format model

      • OptionalnlsParam: string

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

      Returns string

      the date as string

    • Compares two dates. Returns -1 if d1 < d2, 0 if they are equal, and 1 if d1 > d2.

      Parameters

      Returns number

      the result of the comparison as a number between -1 and +1.

    • 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.

      Parameters

      Returns number

      number of days between d1 and d2

    • 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.

      Parameters

      • date: string

        date represented as a string

      • Optionalfmt: string

        optional datetime format model

      • OptionalnlsParam: string

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

      Returns IOracleDate

      the new date as IOracleDate object

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

      Returns IOracleDate

      the system date and time as IOracleDate