Skip to content

Rigour 2.2.2

Choose a tag to compare

@pudo pudo released this 17 Jul 14:25
· 105 commits to main since this release

This release adds utilities for comparing imprecise dates and makes IMO number validation safer and more precise. It supersedes 2.2.1, whose release build failed and was not published.

Highlights

  • Added rigour.dates for working with prefix dates such as 2026, 2026-06, and exact timestamps.
    • Expand dates into UTC intervals with prefix_interval().
    • Compare dates using ended_before() and starts_after().
    • Parse offset-aware exact timestamps with parse_utc().
  • Hardened IMO extraction and validation:
    • Rejects all-zero and very short numeric placeholders.
    • Ignores digit runs longer than seven digits, such as MMSIs.
    • Searches all plausible candidates instead of allowing an earlier invalid number to hide a valid IMO.
    • Prefers longer and explicitly IMO-prefixed candidates.
  • Added scheme-specific validation through IMO.is_valid_vessel() and IMO.is_valid_company().
  • Added prefixdate as a runtime dependency.
  • Fixed the Cargo lockfile version-bump rule that caused the 2.2.1 build failure.

Upgrade note

IMO validation is intentionally stricter. Inputs containing only one-to-four-digit numbers, including values previously padded to seven digits, will no longer be accepted.

Full changelog: v2.2.0...v2.2.2