Help:Ограничения свойств/Разница внутри диапазона

This page is a translated version of the page Help:Property constraints portal/Diff within range and the translation is 55% complete.

Ограничение «difference-within-range constraint (Q21510854)» определяет, что разница между значениями двух свойств должна находиться в пределах определённого диапазона или интервала. Это ограничение доступно для свойств количества или даты.

Например, разница между значениями свойств date of birth (P569) и date of death (P570) должна быть положительной, но не более 150 лет: то есть должна лежать внутри иинтервала .

WikibaseQualityConstraints normalizes the range endpoints before checking this constraint; for example, the intervals and are equivalent.

Если constraint scope (P4680) не определена, это ограничение проверяется только для основного значения элемента. Это также единственная поддерживаемая в настоящее время область.

Возможные действия

На нарушение этого ограничения можно реагировать одним из следующих способов:

  • Возможно, в содержащем ограничение утверждении указано неверное значение, которое должно быть исправлено.
  • Возможно, в другом утверждении содержится неверное значение, которое должно быть исправлено.
  • Возможно, одно из двух утверждений должно быть полностью удалено.
  • Возможно, этот элемент представляет собой редкое, но законное исключение из этого ограничения, и ничего делать не требуется.

Параметры

У этого ограничения три обязательных параметра:

property (P2306)
Contains the related property. Must contain exactly one property (no value Help or unknown value Help is not permitted), which must have the same data type as the property on which the constraint is placed. The difference is calculated as the value for the property with the constraint minus the value for the property given in this parameter, so usually the constraint is placed on the “upper” property (e. g. date of death (P570)), and the parameter specifies the “lower” property (e. g. date of birth (P569)).
minimum value (P2313)
The lower boundary of the permitted range. The unit of the boundary value should match the unit of the two properties (e. g. year (Q577) for date of birth (P569) and date of death (P570)). 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. The unit of the boundary value should match the unit of the two properties (e. g. year (Q577) for date of birth (P569) and date of death (P570)). no value Help can be used to specify a range with no upper boundary ( ). unknown value Help is not permitted.

Example

Example setting for date of birth (P569).

property constraint
  difference-within-range constraint
property date of birth
minimum value 0 year
maximum value 150 year
0 references
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.

Difference with “date of birth (P569)” within range [-1, 150]: the difference with property “date of birth (P569)” should be in the range from “-1” to “150”. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). Known exceptions: Zaro Aga (Q148028), Thomas Parr (Q657399), Shirali Muslumov (Q2349607), Mahmud Eyvazov (Q4529980), Kyle Reese (Q592358), Li Ching-Yuen (Q304690)
List of violations of this constraint: Database reports/Constraint violations/P570#Diff within range

Lists

Lists of properties which are set difference within range constraint.