Skip to content

XML validation doesn't support endOfDayFrag (24:00:00) #29005

@simendsjo

Description

@simendsjo

According to the specification, endOfDayFrag allows a dateTime to have
the timestamp 24:00:00 [1]. This is oddly enough defined as

Alternatively, endOfDayFrag combines the hourFrag, minuteFrag,
minuteFrag, and their separators to represent midnight of the day,
which is the first moment of the next day.

Which doesn't make a lot of sense as a time cannot exist in two dates at
the same time. libxml2 has support for this [2].

My first assumption of this would be that the value should be allowed,
and that it should return the implementation defined latest possible
time for a given date. My google-fu bing-fu doesn't show how others
are handling endOfDayFrag, but as the spec allows it, people are
reporting it, which breaks validation.

I notice an existing issue related ISO8601 parsing[3], which is
probably related to the parsing step.

  1. https://www.w3.org/TR/xmlschema11-2/#nt-eodFrag

  2. https://gitlab.gnome.org/GNOME/libxml2/commit/a1dca81df7c352cd9a14ab678750b1623f8f8ed7

  3. https://github.com/dotnet/coreclr/issues/23064

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Xmlbugin-prThere is an active PR which will close this issue when it is merged

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions