Open peter-dolkens opened 5 years ago
@nickevansuk I didn't mention endDate
in this proposal yet, as I thought it could still be useful as an indicator of when a session MUST be completed by (e.g. Your session starts at 2pm, and SHOULD take 20-40 minutes, and it MUST be completed by 3pm, because we start booking the next session from that time)
Mostly for those sessions where the start time may be a little more flexible too. (Turn up BY 2pm, but your class may not start until 2:15pm)
Wouldn't always be used, but may come in useful in some scenarios.
Let me know what you think.
Looks great! Just updated your example from beta:exampleDuration
to beta:estimatedDuration
(assume that was a typo?).
endDate
being included makes sense to me, though arguably if there was an endDate
one could also calculate the duration
as the "maximum duration", which undermines the proposed validation rules. Good discussion to have on this.
For now I'll go ahead and add this to the beta namespace as you've specified. I've amended your proposal to include this too.
endDate
being included makes sense to me, though arguably if there was anendDate
one could also calculate the duration as the "maximum duration", which undermines the proposed validation rules. Good discussion to have on this.
Yeah, I think it's important to decide how we want to define StartTime
, EndTime
, and estimatedDuration
. If we wish to distinguish between
StartTime
/EndTime
: When a session MUST start after, and complete byestimatedDuration
: How long a session MAY beThere is a difference, based on those definitions, but those may not be the definitions we wish to use for this specification.
As a real life example, if I take driving lessons, I pay by the hour, so they are ALWAYS 2 hours long, but the start time often varies between 5pm and 6pm, depending on when my instructor becomes available. I do know that I'm going to be home by 7pm though.
I would imagine many sports coaching sessions behave in a similar fashion.
Looks good to me, I'd suggest as part of beta testing we ask others if they would find this useful, I think that discussion will help flush out the intended requirements to inform validation rules.
In Parkrun's case they've found that including an endTime
is problematic and actually puts people off, so they just include startTime
on their website.
Perhaps on this basis endTime
, endDate
and duration
should actually be optional?
A potential difficulty with an optional endDate
comes when searching for sessions that intersect a date and time. The logic for this is usually
startDate <= dateTimeOfInterest AND endDate >= dateTimeOfInterest
If endDate
is unspecified and assumed to be "anytime after startDate
", then this search would match any event that started before the dateTimeOfInterest
, even if that was a long time before.
That said , it looks like endDate
is optional so the search code above would already have to deal with using startDate + duration
as endDate
. This proposal would add to that:
endDate = max(endDate, startDate+duration, startDate+estimatedDuration.maxValue)
It might be simpler to require endDate
as the maximum possible endpoint, but have duration
or estimatedDuration
take precedence when an event is displayed. Even Parkrun packs up eventually!
On a side note - @peter-dolkens example above has a date with no time as the endDate
, which is midnight at the start of that day in ISO8601. This puts endDate
before startDate
and would be rejected as inconsistent data.
@croesus forgive my example - it appears we’ve used the naive mapping of .net DateTime to StartDate/EndDate in the sample feed.
The OA spec actually contains both Start/End Date and Start/End Time, so ideally we should be using those appropriately, with both EndDate
and EndTime
optional.
In reference to your search user case, ClubSpark usually works based on individual sessions when searching, and work our way up to the containing course, as a coach may have added a course that runs an entire year, but if they haven’t yet populated the upcoming sessions, then there is little point in returning them in results until that time.
Relevant points from the summary of the W3C call on 12 Feb 2020:
duration
or endDate
at all on their Events, for fear of demotivating people.startDate
, endDate
, and duration
are not self-contradictoryTwo possibilities:
indicativeDuration
from the Routes spec, and make one of duration
or indicativeDuration
REQUIRED.schedulingNote
Notes from call 7 Oct 2020: simple solution would be just to leave this as a beta property, particularly as data consumers don't appear ready to process this at the moment.
Proposer
England Athletics (RunTogether) / LTA
Use Case
In Clubspark, we capture session durations as a range (0-30mins, 30-60mins, 60-90mins, 90+)
Why is this not covered by existing properties?
The spec states that we must return an ISO8601 format duration, however it's also validating that this duration is non-zero, so we're unable to just provide the minimum Duration
Please provide a link to example data
https://api.runtogether.co.uk/odi/public/courses
Proposal
We'd like to propose an
estimatedDuration
field of type QuantitativeValue andunitCode
of MINThis follows the pattern of other duration ranges in
schema.org
that useQuantitativeValue
:And follows the property naming pattern of
estimatedX
:Validation rules should state that: if
estimatedDuration
is provided, thenduration
MUST not be provided. This ensures accurate and consistent data.Beta property
schema:Event
)beta:estimatedDuration
schema:QuantitativeValue
Example