| Did you know ... | Search Documentation: |
| Pack uk_plate_age -- README.md |
Works out when a vehicle was first registered from the age identifier on a Great Britain number plate. Same rules as our Python, D, Haxe and Racket ports, following DVLA leaflet INF104.
?- pack_install(uk_plate_age).
?- use_module(library(uk_plate_age)).
?- plate_period("AB24 CDE", Start, End).
Start = 2024-3, End = 2024-8.
?- plate_period_text("ab74cde", T).
T = "September 2024 to February 2025".
?- plate_period("P123 ABC", S, E).
S = 1996-8, E = 1997-7.
?- identifiers_for_year(2025, Ids).
Ids = [25, 75].
A private plate can make a car look older than it is, never newer. Dateless and Northern Ireland plates have no age identifier, and imports are dated from their first UK registration. The exact answer is the date of first registration on the V5C. plate_period/3 fails when there is no identifier.
swipl -g run_tests -t halt test/test_uk_plate_age.pl
MIT. Maintained by the CarCheckHQ team (DESKLINK LTD). The same decoder runs in the browser at https://carcheckhq.com/tools/number-plate-decoder