# Is valid_iso8601_duration correct? **Category:** [Specifications](https://discourse.openehr.org/c/specifications/6) **Created:** 2022-05-19 01:42 UTC **Views:** 482 **Replies:** 0 **URL:** https://discourse.openehr.org/t/is-valid-iso8601-duration-correct/2631 --- ## Post #1 by @pablo Two things to note: 1. the valid format doesn't mention the fractional seconds which are allowed in openEHR durations, we even have a specific constraint for that in C_DURATION.fractional_seconds_allowed in the AOM spec; 2. IMO the description of the parameter `s` should be separated from the expected result: `s` being any string, and result being: if `s` has this form ... then the result is `true`, the result will be `false` otherwise. (also noting the way other methods of Time_Definitions could be improved). From https://specifications.openehr.org/releases/BASE/latest/foundation_types.html#_time_definitions_class String is a valid ISO 8601 duration, i.e. takes the form: * `P[nnY][nnM][nnW][nnD][T[nnH][nnM][nnS]]` Where each nn represents a number of years, months, etc. `nnW` represents a number of 7-day weeks. Note: allowing the `W` designator in the same expression as other designators is an exception to the published standard, but necessary in clinical information (typically for representing pregnancy duration). Parameters `s` String is a valid ISO 8601 duration, i.e. takes the form: * `P[nnY][nnM][nnW][nnD][T[nnH][nnM][nnS]]` Where each `nn` represents a number of years, months, etc. `nnW` represents a number of 7- day weeks. Note allowing the `W` designator in the same expression as other designators is an exception to the published standard, but necessary in clinical information (typically for representing pregnancy duration). --- **Canonical:** https://discourse.openehr.org/t/is-valid-iso8601-duration-correct/2631 **Original content:** https://discourse.openehr.org/t/is-valid-iso8601-duration-correct/2631