DateRange

DateRange

Overview

Date range represents a time period between two given dates.

ParameterDescriptionType

type

Represents the type of date range
It can be one of the following:
Relative - The date range is dependent on another start and end date
Absolute - The date range has a fixed start date and end date
Lifetime - The date range refers to the lifetime of the ad irrespective of the start and end dates

  • Cannot be null
  • number

    start_date

    Start date of the date range

    string

    begin_date

    Begin date of the date range

    string

    end_date

    End date of the date range

    string

    date_unit

    Date unit associated with the date range
    It can be one of the following:
    Day - The date unit is day
    Week - The date unit is week
    Month - The date unit is month
    Quarter - The date unit is quarter
    Year - The date unit is year

    string

    quantity

    Quantity associated with the date range

    number

    time_zone

    Time zone associated with the date range

    string

    Validations

    Some parameters of this object are validated based on certain conditions being true. Following table lists the conditions and their corresponding validations.

    ConditionValidation

    When date range type is Absolute and begin_date and end_date are not null

    end_date cannot be less than begin_date

    When date range type is Absolute

    time_zone should be a valid time zone

    When date range type is Absolute and end_date is not null

    end_date cannot be greater than current date and time

    When date range type is Absolute and begin_date is not null

    begin_date cannot be negative

    When date range type is Relative

    date_unit cannot be null

    When date range type is Relative

    quantity cannot be null or negative