| 1 Definition | 2 Functional Requirements | 3 Syntax |
| 4 Semantics | 5 Conformance Testing | 6 Performance Assessment |
1 Definition
A Data Type that specifies how an event or time interval repeats over time based on RFC 5545.
2 Functional Requirements
- Representation
- RRULE SHALL represent recurrence rules as defined in RFC 5545.
- RRULE SHALL support two equivalent representations:
- Textual form: A single line string following RFC 5545 grammar (e.g., FREQ=DAILY;INTERVAL=2;BYDAY=MO,WE).
- Structured form: A JSON object with explicit fields corresponding to RRULE components.
- Mandatory and Optional Components
- Mandatory:
- FREQ (Frequency): One of SECONDLY, MINUTELY, HOURLY, DAILY, WEEKLY, MONTHLY, YEARLY.
- Optional:
- INTERVAL (integer ≥ 1, default = 1).
- UNTIL (date-time or date-only, RFC 5545 format).
- COUNT (integer ≥ 1).
- BYSECOND, BYMINUTE, BYHOUR (arrays of integers within valid ranges).
- BYDAY (array of weekday codes, optionally with ordinals for monthly/yearly rules).
- BYMONTHDAY, BYYEARDAY, BYWEEKNO, BYMONTH, BYSETPOS (arrays of integers within RFC ranges).
- WKST (week start day, default = MO).
- Constraints
- COUNT and UNTIL SHALL NOT both appear in the same RRULE.
- Value ranges SHALL follow RFC 5545:
- Seconds/Minutes: 0–59
- Hours: 0–23
- Month: 1–12
- Monthday: −31..−1 or 1..31
- Yearday: −366..−1 or 1..366
- Weekno: −53..−1 or 1..53
- BYDAY ordinals SHALL be allowed only for MONTHLY and YEARLY frequencies.
- Default Values
- INTERVAL defaults to 1 if omitted.
- WKST defaults to MO if omitted.
3 Syntax
https://schemas.mpai.community/OSD/V1.4/data/TimeExpression.json
4 Semantics
| Label | Description |
| Header | Time Expression Header – Standard “OSD-TEX-V” |
| InstanceID | Identifier of the TimeExpression instance (unique within its context). Optional. |
| TimeExpressionID | Globally unique identifier for this TimeExpression definition. Optional. |
| Kind | Expression type selector. Allowed: absolute | interval | relative | coded | schedule. Required at root. |
| – Absolute | Absolute Time |
| – Value | Time instant (Time.json). Required when kind = absolute. |
| – Label | Human-friendly label for the absolute time. Optional. |
| – Interval | Time Interval |
| -Start | Start time (Time.json). Required when kind = interval. |
| – End | End time (Time.json). Required when kind = interval. |
| – Closed | Endpoint inclusion semantics. Enum: both | left | right | none. Default: both. |
| – Approximate | Boolean; boundary times may be approximate. Default: false. |
| – Relative | Relative Time |
| – Anchor | Anchor time (Time.json). Required when kind = relative. |
| – Quantity | Numeric offset magnitude. Type: number. Required. |
| – Unit | Offset unit. Enum: seconds | minutes | hours | days | weeks | months | quarters | years. Required. |
| – Approximate | Boolean; computed target may be approximate. Default: false. |
| – Coded | Coded Time |
| – Pattern | Coded pattern selector. Enum: season_year | weekday_next_week | weekday_this_week | named_period. Required. |
| – Season | Season for season_year. Enum: spring | summer | autumn | winter. |
| – Year | Year for season_year. Type: integer. |
| – Weekday | Weekday code. Enum: MO | TU | WE | TH | FR | SA | SU. |
| – WeekOffset | Integer offset for next/this week patterns. |
| – Anchor | Reference time (Time.json) used by certain coded computations. |
| – Named | Named period. Enum: end_of_month | start_of_quarter | end_of_quarter | start_of_year | end_of_year. |
| – Approximate | Boolean; result may be approximate. Default: false. |
| – Schedule | Time Schedule |
| – Dtstart | Start date/time of the schedule (Time.json). Required when kind = schedule. |
| – RruleObject | RRULE Object |
| – Freq | Frequency. Enum: DAILY | WEEKLY | MONTHLY | YEARLY. Required. |
| – Interval | Interval between recurrences. Type: integer ≥ 1. Default: 1. |
| – Count | Number of occurrences. Type: integer ≥ 1. |
| – Until | End date/time for recurrence (Time.json). |
| – ByDay | Array of weekdays; items enum: MO, TU, WE, TH, FR, SA, SU. |
| – ByMonth | Array of months; items range: 1..12. |
| – ByMonthDay | Array of month days; items range: -31..31. |
| – RruleString | RRULE JSON Objectper RFC 5545. |
| – Rdate | Array of explicitly included dates (Time.json each). |
| – Exdate | Array of explicitly excluded dates (Time.json each). |
| Conditional Requirements | Root allOf: If kind=absolute → absolute required; interval → interval required; relative → relative required; coded → coded required; schedule → schedule required. |
| DataExchangeMetadata | Metadata optionally supporting regulated or controlled exchange of Interaction Potential Data, as defined by AIF V3.0. |
| Trace | Provenance information defined by AIF V3.0, identifying the producing AIM, generation time, and related metadata. |
| DescrMetadata | Descriptive metadata (maximum 2048 characters) supporting annotation, documentation, or indexing. |
5 Conformance Testing
A Data instance Conforms with OSD-TEX Time Expression if:
- Its JSON Object validates against its JSON Schema.
- Any included JSON Object validates against its JSON Schema.
- All Data in the JSON Object:
- Have the specified Data Types.
- Conform with the Qualifiers signaled in their JSON Schemas.
6 Performance Assessment