FractionOfDateTimeUtc🔗

Type: Transpilable verification function
Get the digits of the fraction of a second in text.
The text is expected to be a valid xs:dateTime with the time zone fixed to UTC, i.e. , it ends with Z, +00:00 or -00:00.
text🔗
Date-time to be parsed
Return🔗
The digits after the decimal point, or an empty text if there are none

Code

point = text.find(".")
if point == -1:
    return ""

if text.endswith("Z"):
    return text[point + 1 : -1]

return text[point + 1 : -6]