Bluestep JS Documentation
    Preparing search index...

    Class Period

    A date-based amount of time in the ISO-8601 calendar system, such as '2 years, 3 months and 4 days'.

    See java.time.Period for full documentation

    Index

    Constructors

    Methods

    • Adds this period to the specified temporal object.

      Parameters

      Returns Temporal

    • Gets the value of the requested unit.

      Parameters

      Returns number

    • Gets the amount of days of this period.

      Returns number

    • Gets the amount of months of this period.

      Returns number

    • Gets the set of units supported by this period.

      Returns TemporalUnit[]

    • Gets the amount of years of this period.

      Returns number

    • Checks if any of the three units of this period are negative.

      Returns boolean

    • Checks if all three units of this period are zero.

      Returns boolean

    • Returns a copy of this period with the specified period subtracted.

      Parameters

      Returns Period

    • Returns a copy of this period with the specified days subtracted.

      Parameters

      • daysToSubtract: number

      Returns Period

    • Returns a copy of this period with the specified months subtracted.

      Parameters

      • monthsToSubtract: number

      Returns Period

    • Returns a copy of this period with the specified years subtracted.

      Parameters

      • yearsToSubtract: number

      Returns Period

    • Returns a new instance with each element in this period multiplied by the specified scalar.

      Parameters

      • scalar: number

      Returns Period

    • Returns a new instance with each amount in this period negated.

      Returns Period

    • Returns a copy of this period with the years and months normalized.

      Returns Period

    • Returns a copy of this period with the specified period added.

      Parameters

      Returns Period

    • Returns a copy of this period with the specified days added.

      Parameters

      • daysToAdd: number

      Returns Period

    • Returns a copy of this period with the specified months added.

      Parameters

      • monthsToAdd: number

      Returns Period

    • Returns a copy of this period with the specified years added.

      Parameters

      • yearsToAdd: number

      Returns Period

    • Subtracts this period from the specified temporal object.

      Parameters

      Returns Temporal

    • Gets the total number of months in this period.

      Returns number

    • Returns a copy of this period with the specified amount of days.

      Parameters

      • days: number

      Returns Period

    • Returns a copy of this period with the specified amount of months.

      Parameters

      • months: number

      Returns Period

    • Returns a copy of this period with the specified amount of years.

      Parameters

      • years: number

      Returns Period

    • Obtains a Period consisting of the number of years, months, and days between two dates.

      Parameters

      Returns Period

    • Obtains an instance of Period from a temporal amount.

      Parameters

      Returns Period

    • Obtains a Period representing a number of years, months and days.

      Parameters

      • years: number
      • months: number
      • days: number

      Returns Period

    • Obtains a Period representing a number of days.

      Parameters

      • days: number

      Returns Period

    • Obtains a Period representing a number of months.

      Parameters

      • months: number

      Returns Period

    • Obtains a Period representing a number of weeks.

      Parameters

      • weeks: number

      Returns Period

    • Obtains a Period representing a number of years.

      Parameters

      • years: number

      Returns Period

    • Obtains a Period from a text string such as PnYnMnD.

      Parameters

      • text: string

      Returns Period