Belin.io Core
    Preparing search index...

    Defines a date range.

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    end: Date

    The end date.

    start: Date

    The start date.

    The range type.

    Methods

    • Returns a value indicating whether this date range is equal to the specified date range.

      Parameters

      • other: DateRange

        The other date range to compare.

      Returns boolean

      true if this date range is equal to the specified date range, otherwise false.

    • Creates a date range corresponding to the day including the specified date.

      Parameters

      • date: Date

        The date.

      Returns DateRange

      The date range corresponding to the day including the specified date.

    • Creates a new date range from the specified JSON object.

      Parameters

      • json: Record<string, any>

        A JSON object representing a date range.

      Returns DateRange

      The instance corresponding to the specified JSON object.

    • Creates a date range corresponding to the month including the specified date.

      Parameters

      • date: Date

        The date.

      Returns DateRange

      The date range corresponding to the month including the specified date.

    • Creates a date range corresponding to the quarter including the specified date.

      Parameters

      • date: Date

        The date.

      Returns DateRange

      The date range corresponding to the quarter including the specified date.

    • Creates a date range corresponding to the week including the specified date.

      Parameters

      • date: Date

        The date.

      Returns DateRange

      The date range corresponding to the week including the specified date.

    • Creates a date range corresponding to the year including the specified date.

      Parameters

      • date: Date

        The date.

      Returns DateRange

      The date range corresponding to the year including the specified date.