| Did you know ... | Search Documentation: |
| Packs (add-ons) for SWI-Prolog |
| Title: | Registration periods from UK (GB) number plate age identifiers |
|---|---|
| Rating: | Not rated. Create the first rating! |
| Latest version: | 1.0.0 |
| SHA1 sum: | baa6f662dedaca17c05d66ed15edf9097bbddf9a |
| Author: | CarCheckHQ team <support@carcheckhq.com> |
| Maintainer: | CarCheckHQ team <support@carcheckhq.com> |
| Packager: | CarCheckHQ team <support@carcheckhq.com> |
| Home page: | https://carcheckhq.com/tools/number-plate-decoder |
| Download URL: | https://framagit.org/carcheckhq/uk-plate-age/-/raw/main/prolog/uk_plate_age-*.tgz |
No reviews. Create the first review!.
| Version | SHA1 | #Downloads | URL |
|---|---|---|---|
| 1.0.0 | baa6f662dedaca17c05d66ed15edf9097bbddf9a | 1 | https://framagit.org/carcheckhq/uk-plate-age/-/raw/main/prolog/uk_plate_age-1.0.0.tgz |
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
Pack contains 5 files holding a total of 9.0K bytes.