How code should resolve two-digit years in passport MRZ dates
Passport machine-readable zones store dates as YYMMDD without a century, so a value like 740812 could mean 1974 or 2074. For dates of birth, the rule is to use the current century unless that yields a future date, in which case the previous century applies. For expiry dates, the century that places the date closest to today is chosen. Both rules have edge cases, and the visual zone's four-digit year is the tiebreaker when they arise. The article also covers rejecting impossible dates such as 30 February by treating them as unread rather than trusting them, and handling unknown fields marked with filler characters. It recommends defining a consistent reference date for validity checks so results do not vary by region.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in