RangeChecker and DiffWithinRange checker need to account for units. Hopefully, it won’t be too hard to calculate and return the normalized value (which we already have for the query service) in RangeCheckerHelper.
Hm, what happens if any values can’t be converted to standard units? Perhaps we can just compare the raw quantities in that case (as before), and assume that most properties would also have a Units constraints which would report this case instead.
Copying this comment from Gerrit so it doesn’t get buried:
There’s one remaining problem [with Change Ic5dee62c01, PS12]: While the conversion of units in “difference within range” is very nice in theory (at least, IMHO :) ), it doesn’t really work on Wikidata. There are only three “difference within range” constraints on Wikidata, and they all use the unit “year” (Q577), which doesn’t have a standard unit conversion. We might have to make “year” a special case, where we really just count the full years between two dates.