Help:Property constraints portal/Range/fr

From Wikidata
Jump to navigation Jump to search
This page is a translated version of the page Help:Property constraints portal/Range and the translation is 11% complete.

range constraint (Q21510860) specifies that values for a property should be within a certain range or interval. This constraint is available for quantity or date properties.

For example, flattening (P1102) is always between 0 or 1 (within the interval ), and UTC date of spacecraft launch (P619) should not be before .

WikibaseQualityConstraints normalizes all quantities (applies unit conversion) before checking this constraint. For example, a mass of 500 g will be considered to lie within the range of , although 500 is not within the range , because the range endpoints are converted to ; on the other hand, a duration of 100 days will be considered to lie outside the range of (note the missing units) because it is interpreted as 8640000 seconds.

If no constraint scope (P4680) is specified, this constraint is checked everywhere.

Actions possibles

There are several possible ways to address a violation of this constraint:

  • It’s possible that the value in the statement is incorrect (e. g. due to confusing the thousands separator with the decimal separator) and should be fixed.
  • It’s possible that the current item should not have the statement at all, and that the statement should be removed.
  • It’s possible that the item is a rare, but legitimate exception to the constraint, and nothing should be done.

Paramètres

On “quantity”-type properties, the following two parameters are mandatory:

minimum value (P2313)
The lower boundary of the permitted range. no value Help can be used to specify a range with no lower boundary (). unknown value Help is not permitted.
maximum value (P2312)
The upper boundary of the permitted range. no value Help can be used to specify a range with no upper boundary (). unknown value Help is not permitted.

On “point in time”-type properties, following two parameters are mandatory:

minimum date (property constraint) (P2310)
The lower boundary of the permitted range. no value Help can be used to specify a range with no lower boundary (). unknown value Help means the current date at the time the constraint is checked.
maximum date (property constraint) (P2311)
The upper boundary of the permitted range. no value Help can be used to specify a range with no upper boundary (). unknown value Help means the current date at the time the constraint is checked.

In both cases, the interval is always inclusive on both ends: the minimum and maximum value are both permitted values.

Examples

Example 1

Example setting for atomic number (P1086).

property constraint
Normal rank range constraint
minimum value 0
maximum value 155
0 reference
add reference


add value

Example 2

Example setting for retrieved (P813). "15 January 2001" is the day when Wikipedia went online (Wikipedia Day). "unknown value" is added to statements by clicking on the icon beside the value field that looks like this . "unknown value" is interpreted as "now".

property constraint
Normal rank range constraint
minimum date (property constraint) 15 January 2001
maximum date (property constraint) unknown value
0 reference
add reference


add value

Template

When the constraint is set to the property, the following template is automatically displayed in the property talk page. The template is created by Module:Constraints using Template:Constraint, invoked from Template:Property documentation. Translations are defined at Module:i18n/constraints.

Range from “+2001-01-15T00:00:00Z” to “now”: values should be in the range from “+2001-01-15T00:00:00Z” to “now”. (Help)
List of violations of this constraint: Database reports/Constraint violations/P813#Range, hourly updated report

Lists

Lists of properties which are set range constraint.