Skip to main content

parse_ambiguous_tz_annotation

Function parse_ambiguous_tz_annotation 

Source
pub(crate) fn parse_ambiguous_tz_annotation<'a, T: EncodingType>(
    cursor: &mut Cursor<'a, T>,
) -> ParserResult<Option<TimeZoneAnnotation<'a, T>>>
Expand description

We support two kinds of annotations here: annotations (e.g. [u-ca=foo]) and “time zone annotations” ([UTC] or [+05:30])

When parsing bracketed contents, we need to figure out which one we’re dealing with.

This function returns a time zone annotation if we are dealing with a time zone, otherwise it returns None (and the caller must handle non-tz annotations).