OpenProposal 3.0 JSON Schema Unofficial

Decision records · Value formats

D-001 Which written form does an ISO 8601 point in time or duration take?

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

What the schemas do

The RFC 3339 forms that JSON Schema names as formats. Every point in time is a date-time with a required UTC offset. A length of time is a duration in the ISO 8601 grammar of RFC 3339 Appendix A.

Options

  • rfc-3339 Chosen

    The RFC 3339 forms that JSON Schema names as formats. Every point in time is a date-time with a required UTC offset. A length of time is a duration in the ISO 8601 grammar of RFC 3339 Appendix A.

  • any-iso-8601

    Any ISO 8601 representation, including the basic format (20261025T0900), week and ordinal dates, reduced precision, and local times without an offset.

Why

ISO 8601 allows many representations of one instant, and a local time without an offset names no instant at all, so two parties can't compare valid_until or hold_expires_at without agreeing on more. RFC 3339 is the internet profile of ISO 8601. It requires an offset and has one extended form, and JSON Schema's date-time and duration formats name it exactly, so standard validators check it without a custom pattern. The § 3.2 "date range" bounds are ranges of these points in time.

What we ask the specification to state

Name RFC 3339 instead of ISO 8601. Every point in time is an RFC 3339 date-time with a UTC offset. Durations follow the ISO 8601 duration grammar in RFC 3339 Appendix A.

The specification lines it rests on

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

main

  • § 4.1, the valid_from and valid_until row L190 at 44dfaaf
    valid_from · valid_until | Timestamp | seller-set | ISO-8601 window the offer holds. This is the offer window, not the campaign flight
  • § 5.6.2, the hold_status.hold_expires_at key row L310 at 44dfaaf
    hold_expires_at | Absolute timestamp, set when the hold is granted
  • § 5.6.2, the hold_status.hold_duration key row L307 at 44dfaaf
    hold_duration | ISO-8601 duration the hold runs for
  • § 3.2, a requirement L158 at 44dfaaf
    Every field marked settable MUST declare its bounds: either allowed[] (an enumerated set) or min / max (a numeric or date range).

With the open PRs

  • § 4.1, the valid_from and valid_until row L183 on main at 981a74e
    valid_from · valid_until | Timestamp | seller-set | ISO-8601 window the offer holds. This is the offer window, not the campaign flight
  • § 5.6.2, the hold_status.hold_expires_at key row L303 on main at 981a74e
    hold_expires_at | Absolute timestamp, set when the hold is granted
  • § 5.6.2, the hold_status.hold_duration key row L300 on main at 981a74e
    hold_duration | ISO-8601 duration the hold runs for
  • § 3.2, a requirement L151 on main at 981a74e
    Every field marked settable MUST declare its bounds: either allowed[] (an enumerated set) or min / max (a numeric or date range).

What it shapes

main: Duration, Timestamp, HoldStatus.hold_duration, HoldStatus.hold_expires_at, Proposal.valid_from, Proposal.valid_until

With the open PRs: Duration, Timestamp, HoldStatus.hold_duration, HoldStatus.hold_expires_at, Proposal.valid_from, Proposal.valid_until

The record's YAML file