type DateRange (v202408)
Stay organized with collections
Save and categorize content based on your preferences.
Represents a range of dates that has an upper and a lower bound.
An open ended date range can be described by only setting either
one of the bounds, the upper bound or the lower bound.
- Namespace
-
https://www.google.com/apis/ads/publisher/v202408
Field
|
startDate
|
Date
The start date of this range. This field is optional and if it is not set then there is no
lower bound on the date range. If this field is not set then endDate must be specified.
|
endDate
|
Date
The end date of this range. This field is optional and if it is not set then there is no upper
bound on the date range. If this field is not set then startDate must be specified.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-06 UTC.
[null,null,["Last updated 2025-08-06 UTC."],[[["\u003cp\u003eDateRange in Google Ad Manager represents a period with a start and end date, used to define timeframes for reporting or forecasting.\u003c/p\u003e\n"],["\u003cp\u003eEither \u003ccode\u003estartDate\u003c/code\u003e or \u003ccode\u003eendDate\u003c/code\u003e must be specified to define the range, while setting both creates a closed period.\u003c/p\u003e\n"],["\u003cp\u003eOpen-ended ranges are possible by omitting either \u003ccode\u003estartDate\u003c/code\u003e (for unbounded future) or \u003ccode\u003eendDate\u003c/code\u003e (for unbounded past).\u003c/p\u003e\n"],["\u003cp\u003eThis object is part of the \u003ccode\u003eForecastService\u003c/code\u003e and utilized within the Ad Manager API for functions like forecasting ad traffic.\u003c/p\u003e\n"]]],["The document defines `DateRange`, used within `AdjustmentService` and `ForecastService`. It represents a date span with optional `startDate` and `endDate` fields. Specifying only one bound creates an open-ended range. If `startDate` is not set, `endDate` must be provided, and vice versa. The associated namespace for these services is `https://www.google.com/apis/ads/publisher/v202408`. `ForecastService` relies on `TimeSeries`, `TrafficDataRequest`, and `TrafficDataResponse`.\n"],null,["# type DateRange (v202408)\n\n**Service** \n[AdjustmentService](/ad-manager/api/reference/v202408/AdjustmentService.DateRange) **ForecastService** **Dependencies** \n[TimeSeries](/ad-manager/api/reference/v202408/ForecastService.TimeSeries) [TrafficDataRequest](/ad-manager/api/reference/v202408/ForecastService.TrafficDataRequest) [TrafficDataResponse](/ad-manager/api/reference/v202408/ForecastService.TrafficDataResponse) \n▼\n**DateRange**\n\n\nRepresents a range of dates that has an upper and a lower bound.\n\nAn open ended date range can be described by only setting either\none of the bounds, the upper bound or the lower bound.\n\n*** ** * ** ***\n\nNamespace\n:\n `https://www.google.com/apis/ads/publisher/v202408`\n\n| Field ----- ||\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ### `startDate` | ` `[Date](/ad-manager/api/reference/v202408/ForecastService.Date)` ` The start date of this range. This field is optional and if it is not set then there is no lower bound on the date range. If this field is not set then `endDate` must be specified. |\n| ### `endDate` | ` `[Date](/ad-manager/api/reference/v202408/ForecastService.Date)` ` The end date of this range. This field is optional and if it is not set then there is no upper bound on the date range. If this field is not set then `startDate` must be specified. |"]]