OpenProposal 3.0 JSON Schema Unofficial

Decision records · Value formats

D-045 May a daypart window's days[] be empty, or name one day twice?

Gap Decision 12 on the supporting page of #121. Cited on main and with the open PRs.

What the schemas do

days[] names at least one day, and each day at most once.

Options

  • days-at-least-one-each-once Chosen

    days[] names at least one day, and each day at most once.

  • any-list

    days[] is any list of day names, the empty one and repeated days included.

Why

The text writes days[] and says which values it takes, not how many, so neither bound is the text's. A window applies on each day it names, so a window with no day never applies, and an allowed window that never applies offers the buyer nothing; a day named twice adds no day to the window. Google Ad Manager, whose day part the window follows (D-004), shows the first bound: a DayPart holds one dayOfWeek, "Day of the week the target applies to. This field is required.", so a day part with no day can't be written there, and a window of several days is one day part for each day. Ad Manager has no list of days in which a day could repeat, so the second bound rests on the window's meaning alone. The schema states both on the list, minItems: 1 and uniqueItems: true, and the list stays a list, not a set, so its order is the writer's.

What we ask the specification to state

Say that a daypart window's days[] names at least one day, and each day at most once.

The specification lines it rests on

Each line is quoted as the record pins it. Expand an item to read the quote.

main

  • § 5.5, the daypart row L260 at 44dfaaf
    daypart | Object | settable | allowed[] of time windows

With the open PRs

  • § 5.5, the daypart row L260 in #123
    daypart | Object | settable | allowed[] of { days[], start, end }: days[] from monday | tuesday | wednesday | thursday | friday | saturday | sunday, HH:MM civil time, end exclusive, up to 24:00
  • § 5.5, a sentence L264 in #123
    A daypart window is { days[], start, end }, with days[] from Monday to Sunday, start and end as HH:MM, and end exclusive, later than start, and allowed to be 24:00.

What it shapes

main: DaypartWindow, LineItem.daypart

With the open PRs: DaypartWindow, LineItem.daypart

The record's YAML file