IsXsGMonthDay🔗

Type: Transpilable verification function
Check that text is a valid xs:gMonthDay.

We check that the text matches the pattern of xs:gMonthDay, and that the day exists in the month. February 29th is valid, as there is no year to tell otherwise.

See: https://www.w3.org/TR/xmlschema-2/#gMonthDay

text🔗
Text to be checked
Return🔗
True if the text is a valid xs:gMonthDay

Code

return matches_xs_g_month_day(text) and _is_day_of_month_valid(
    True, int(text[2:4]), int(text[5:7])
)