Rigour 2.2.2
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.datesfor working with prefix dates such as2026,2026-06, and exact timestamps.- Expand dates into UTC intervals with
prefix_interval(). - Compare dates using
ended_before()andstarts_after(). - Parse offset-aware exact timestamps with
parse_utc().
- Expand dates into UTC intervals with
- 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()andIMO.is_valid_company(). - Added
prefixdateas 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