Closed JozefAerts closed 2 days ago
@JozefAerts would there only be one rule that is using this? In that case it's better to create a regular expression. In case that there are multiple rules that would using this, a function can be created Can you give an example of an invalid duration because there are a lot of possibilities of correct durations? Negative durations for --DUR is already checked
@nickdedonder This operator would be helpful for several DDF/USDM rules too.
In analogy with the function "invalid_date", can we have a function "invalid_duration", checking whether the value is a valid ISO-8601 duration (the "P-format")? We can probably do this by regular expressions, but I think this can better be implemented at the Python level, for reason of consistency (different people may use different regular expressions), and the regular expressions for "duration" are rather complex.