MatchesXsGDay🔗

Type: Pattern verification
Check that text conforms to the pattern of an xs:gDay.
text🔗
Text to be checked
Return🔗
True if the text conforms to the pattern

Code

gDayLexicalRep = (
    '---(0[1-9]|[12][0-9]|3[01])(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?'
)
pattern = (
    f'^{gDayLexicalRep}$'
)
return match(
    pattern,
    text
) is not None