JavaScript API for Oracle type INTERVAL YEAR TO MONTH.

Hierarchy

  • IOracleIntervalYearToMonth

Constructors

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

    Returns

    new IOracleIntervalYearToMonth

    Parameters

    • yr: number

      year value

    • mnth: number

      month value

    Returns IOracleIntervalYearToMonth

Methods

  • Returns an IOracleIntervalYearToMonth for the given number of years. If the number of years contains a fractional part, the number of months will be set accordingly.

    Returns

    new IOracleIntervalYearToMonth for the given number of years.

    Parameters

    Returns IOracleIntervalYearToMonth

  • 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

    Returns

    new IOracleIntervalYearToMonth

    Parameters

    • interval: string

      string to parse

    Returns IOracleIntervalYearToMonth

  • Returns the total number of months from the interval

    Returns

    the total number of months from the interval

    Returns number

  • Returns the number of years from the interval

    Returns

    the number of years from the interval

    Returns number

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

    Returns

    a string representing the year-to-month interval

    Returns string

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

    Returns

    a string representing the interval

    Parameters

    • yearsPrecision: number

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

    Returns string