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

    Class IOracleIntervalYearToMonth

    JavaScript API for Oracle type INTERVAL YEAR TO MONTH.

    Index

    Constructors

    • Constructor for IOracleIntervalYearToMonth using year and month. All arguments must be integral numbers.

      Parameters

      • yr: number

        year value

      • mnth: number

        month value

      Returns IOracleIntervalYearToMonth

      new IOracleIntervalYearToMonth

    Methods

    • Returns the total number of months from the interval

      Returns number

      the total number of months from the interval

    • Returns the number of years from the interval

      Returns number

      the number of years from the interval

    • Given an interval, produces a string representing the interval. The string is formatted with at least 2 digits for the number of years.

      Returns string

      a string representing the year-to-month interval

    • Produces a string representing the interval. The string is formatted according to the specified precision for days and fractional seconds.

      Parameters

      • yearsPrecision: number

        The number of digits used to represent years in the interval string.

      Returns string

      a string representing the interval

    • Parse an interval string into IOracleIntervalYearToMonth. fromString accepts the same input formats as the Oracle SQL function TO_YMINTERVAL:

      • SQL interval format compatible with the SQL standard (ISO/IEC 9075)
      • ISO duration format compatible with the ISO 8601:2004 standard

      Parameters

      • interval: string

        string to parse

      Returns IOracleIntervalYearToMonth

      new IOracleIntervalYearToMonth