Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify duration spec #129

Open
saerdnaer opened this issue Dec 8, 2023 · 0 comments
Open

Clarify duration spec #129

saerdnaer opened this issue Dec 8, 2023 · 0 comments

Comments

@saerdnaer
Copy link
Member

saerdnaer commented Dec 8, 2023

During Camp2023 we came across an Event which took longer than 24h (due to a user input validation error) which broke the Android app as it was not cleary specified if 1:00:00 is H:MM:SS aka 1h or D:HH:MM aka 1day = 24h.

EventFahrplan/EventFahrplan#561

We could an a comment or validation to the XML + JSON schema to check for this issue. Normally the content of the duration field is ony HH:MM eh 1:15 for a 75 minute session

"Duration": {
"title": "Duration (hh:mm)",
"type": "string",
"examples": ["00:30", "01:30"],
"pattern": "^[0-9]+:[0-9]{2}$"
}

<xs:simpleType name="duration">
<xs:restriction base="xs:string">
<xs:pattern value="([0-9]{1,2}:[0-9]{2})|([0-9]{1,2}:[0-9]{2}:[0-9]{1,2})"/>
</xs:restriction>
</xs:simpleType>

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant