Chartbreaker
    Preparing search index...

    Class Span

    Index

    Constructors

    • Data class representing a parsed timespan expression

      Basic span expression consist of a number and a time unit (which can be written in different ways). The following are all examples of valid spans:

      "6m", "1y", "6 months", "2d", "1 day"

      Available units are "year", "month", "week", "day", "hour", "minute", "second", and "intraday".

      The special unit "intraday" will take into account the meta data (trading times) of a charts main timeseries.

      It is also possible to just specifiy a start date, e.g. "12.04.2002" and an end date, separated by a semicolon. The end date can also be omitted, which will make the span extend all the way to "now"

      Example: "12.04.2002;30.09.2010"

      Parameters

      • Optionalexpression: string | number
      • Optionaltz: string

      Returns Span

    Methods

    • Parameters

      • span: string | number | Span

      Returns number

    • Parameters

      • duration: number

      Returns number

    • Parameters

      • Optionalto: number

      Returns number

    • Parameters

      • Optionalto: number

      Returns number

    • Parameters

      • Optionalto: number

      Returns number

    • Returns boolean

    • Returns boolean

    • Returns string

    • Parameters

      • expression: string | number
      • Optionaltz: string

      Returns null | Span

    • Parameters

      • expression: string | number

      Returns boolean