Skip to content

v4.8.5

Latest

Choose a tag to compare

@github-actions github-actions released this 18 Nov 15:35
a6bbb4e

Patch Changes

  • Compare time, iso-time, date-time and iso-date-time exactly in formatMinimum, formatMaximum, formatExclusiveMinimum and formatExclusiveMaximum, in place of the comparators of ajv-formats. A limit at the Unix epoch (1970-01-01T00:00:00Z) is now checked, fractions of a second are compared beyond milliseconds, equal fractions such as .1 and .10 compare as equal, and a limit that is not a string no longer throws a TypeError for iso-date-time. An iso-date-time without a time zone is compared as UTC, while iso-time still compares the time as written and ignores any time zone, so 09:00:00 and 09:00:00+02:00 are equal. A limit that is not valid for its format is not compared, like before: a date or time out of range such as 2024-13-01T00:00:00Z or 25:00:00Z, a second 60 outside the last minute of the day in UTC, or a time or date-time without a time zone. A leap second (23:59:60Z) comes before the next midnight. Precompiled checks use the new comparators through schema-utils/dist/runtime, so they don't need to be generated again. (by @alexander-akait in #249)