Hi Jürgen, On 2022-01-03, at 22:25, Jürgen Schönwälder <j.schoenwael...@jacobs-university.de> wrote: > > On Mon, Jan 03, 2022 at 10:05:15PM +0100, Carsten Bormann wrote: >> Does my little example of the approximate current time (২০২২-০১-০৩T২১:৪০:০০) >> match RFC 6991 date-and-time? >> >> I think it does, but I’m also pretty sure that wasn’t intended. >> There are a few more cases of \d in RFC 6991, where the equivalent >> definitely wouldn’t work. >> > > The example may pass the pattern but it likely does not statisfy the > additional requirements spelled out in the description statement.
I understand that, but there are two observations: (1) as noted, the pattern is too permissive (unnecessarily so, as \d can simply be replaced with [0-9] to match Section 5.6 of RFC 3339). (2) but you cannot ignore the pattern, as it also is more restrictive than the description indicates (it requires capital T and, if present, capital Z — see the note in Section 5.6 on how such a restriction of the case-insensitive RFC 3339 format is allowed, but then the assertion "The profile is defined by the date-time production in Section 5.6 of RFC 3339.” in the YANG description statement is, err, not the whole story). (Background: We are wrangling with regexps in JSONPATH and date/time formats in SEDATE, and I’d like to make sure what we do there fits with what we can learn from YANG.) Grüße, Carsten _______________________________________________ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod