Skip to content

Conversation

@JKingweb
Copy link
Contributor

@JKingweb JKingweb commented Jan 30, 2026

This patch mainly applies to the microformats-v2-unit/value/value-dt test set. Another test was simply renamed to reflect the specification's requirements probably being unintended (see parsing issue #66).

Previously the value-dt test had one repeated error: colons were used in time zone offsets, both in input and output. This is incorrect, both in that offsets are not supposed to have colons when normalized, and in that the comment at the top of the HTML input stated that the required formats for the test did not include offset-with-colon.

This version of the test also shores up coverage in a few spots, namely:

  • Changes existing cases to better expose different failure modes (e.g. incorrectly falling back to textContent when an authoritative attribute yields an invalid value)
  • Covers a date-time combo being stitched to a lone time zone offset, and other variations
  • Covers more "ignore any further 'value' elements which specify X" cases
  • Covers implied date both before and after a time-only value
  • Covers a time-only value when no implied date is available

The last case is one that the JS, JS-shiv, PHP, Python, Ruby-MicroMicro, and Rust parsers all get wrong (Elixir, Perl, and Ruby crash on the test as a whole). This is perhaps in part due to the VCP specification being arguably self-contradictory, with the date parsing section stating:

If by parsing the "value" element(s), at least a specific date has been found, then the "value" is overall valid

But the implied date section states:

otherwise it simply has a time (and no date).

Presumably the latter section means "otherwise it simply has a time (and no date) [and is therefore invalid]."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant