@adcp/sdk API Reference - v17.0.0-rc.0
    Preparing search index...

    Type Alias DaypartTarget

    DaypartTarget:
        | {
            days: DayOfWeek[];
            start_hour: number;
            end_hour: number;
            timezone?: "inventory_local"
            | IANATimezoneIdentifier;
            label?: string;
            start_time?: never;
            end_time?: never;
        }
        | {
            days: DayOfWeek[];
            start_time: string;
            end_time: string;
            timezone?: "inventory_local"
            | IANATimezoneIdentifier;
            label?: string;
            start_hour?: never;
            end_hour?: never;
        }

    A time window for daypart targeting. Specifies days of week, a time-of-day range, and the civil-time clock used to evaluate it. The range is either whole hours (start_hour inclusive, end_hour exclusive; e.g., 6-10 = 6:00am to 10:00am) or, experimentally, minute-resolution clock times (start_time inclusive, end_time exclusive; e.g., 19:30-23:00); an entry carries exactly one form. Follows the Google Ads AdScheduleInfo / DV360 DayPartTargeting pattern.

    Type Declaration

    • {
          days: DayOfWeek[];
          start_hour: number;
          end_hour: number;
          timezone?: "inventory_local" | IANATimezoneIdentifier;
          label?: string;
          start_time?: never;
          end_time?: never;
      }
      • days: DayOfWeek[]

        Days of week this window applies to. Use multiple days for compact targeting (e.g., monday-friday in one object). For an overnight start_time/end_time window, each day names the day the window starts on.

      • start_hour: number

        Start hour (inclusive), 0-23 in 24-hour format. 0 = midnight, 6 = 6:00am, 18 = 6:00pm. Whole-hour form: pair with end_hour; mutually exclusive with start_time and end_time.

        0

        23

        int

      • end_hour: number

        End hour (exclusive), 1-24 in 24-hour format. 10 = 10:00am, 24 = midnight. Must be greater than start_hour; whole-hour windows never cross midnight. Whole-hour form: pair with start_hour; mutually exclusive with start_time and end_time.

        1

        24

        int

      • Optionaltimezone?: "inventory_local" | IANATimezoneIdentifier

        Civil-time clock used to evaluate this window. 'inventory_local' evaluates the hours in the seller-assigned local timezone of each inventory unit that can deliver the impression, such as a screen, venue, station, or publisher property; it never means the buyer, account, or server timezone. A concrete IANA timezone identifier (for example, 'America/New_York', 'CET', or 'UTC') evaluates one shared civil-time clock across the targeted inventory. Omission defaults to 'inventory_local'. Buyers that begin with a user or account preference MUST resolve it to a concrete IANA identifier before sending the daypart; 'user_timezone' and 'account_timezone' are not wire values. For each candidate delivery instant, convert the instant into this clock and compare its resulting local day and time of day with the half-open window: a skipped DST hour or interval has no matching instants, while both occurrences of a repeated hour or interval match. For an overnight start_time/end_time window, an instant matches when its local day is a listed day and its local time is at or after start_time, or when the local day before it is a listed day and its local time is before end_time. This delivery clock is independent of reporting_capabilities.timezone.

      • Optionallabel?: string

        Optional human-readable name for this time window (e.g., 'Morning Drive', 'Prime Time')

      • Optionalstart_time?: never
      • Optionalend_time?: never
    • {
          days: DayOfWeek[];
          start_time: string;
          end_time: string;
          timezone?: "inventory_local" | IANATimezoneIdentifier;
          label?: string;
          start_hour?: never;
          end_hour?: never;
      }
      • days: DayOfWeek[]

        Days of week this window applies to. Use multiple days for compact targeting (e.g., monday-friday in one object). For an overnight start_time/end_time window, each day names the day the window starts on.

      • start_time: string

        Experimental in AdCP 3.3. Start of the window (inclusive) as a 24-hour HH:MM civil clock time on the entry's timezone clock, such as '19:30'. Use for windows that do not fall on whole hours (linear TV programme junctions, quarter-hour schedules). Pair with end_time; mutually exclusive with start_hour and end_hour. A window whose end_time is earlier than its start_time crosses midnight and belongs to the day it starts on. A product accepts only the finest time granularity it declares in overlay_support.daypart_targets.time_granularity; sellers MUST reject, never round, a clock time the product does not honor.

        ^([01][0-9]|2[0-3]):[0-5][0-9]$

      • end_time: string

        Experimental in AdCP 3.3. End of the window (exclusive) as a 24-hour HH:MM civil clock time, such as '23:00'. Pair with start_time; mutually exclusive with start_hour and end_hour. end_time earlier than start_time means the window crosses midnight and ends at end_time on the following civil day (for example, 22:00 to 02:00 runs from 22:00 on a listed day until 02:00 the next morning); '00:00' therefore ends the window at the midnight closing the start day. end_time MUST NOT equal start_time: a zero-length or full-day window is invalid, and a full day uses start_hour 0 with end_hour 24. Sellers MUST reject an equal pair with INVALID_REQUEST.

        ^([01][0-9]|2[0-3]):[0-5][0-9]$

      • Optionaltimezone?: "inventory_local" | IANATimezoneIdentifier

        Civil-time clock used to evaluate this window. 'inventory_local' evaluates the hours in the seller-assigned local timezone of each inventory unit that can deliver the impression, such as a screen, venue, station, or publisher property; it never means the buyer, account, or server timezone. A concrete IANA timezone identifier (for example, 'America/New_York', 'CET', or 'UTC') evaluates one shared civil-time clock across the targeted inventory. Omission defaults to 'inventory_local'. Buyers that begin with a user or account preference MUST resolve it to a concrete IANA identifier before sending the daypart; 'user_timezone' and 'account_timezone' are not wire values. For each candidate delivery instant, convert the instant into this clock and compare its resulting local day and time of day with the half-open window: a skipped DST hour or interval has no matching instants, while both occurrences of a repeated hour or interval match. For an overnight start_time/end_time window, an instant matches when its local day is a listed day and its local time is at or after start_time, or when the local day before it is a listed day and its local time is before end_time. This delivery clock is independent of reporting_capabilities.timezone.

      • Optionallabel?: string

        Optional human-readable name for this time window (e.g., 'Morning Drive', 'Prime Time')

      • Optionalstart_hour?: never
      • Optionalend_hour?: never