9.2.9 Date Comparison with Day Tolerance  'FieldComparatorDate'

This field comparator function compares two dates which must be given in the three separate fields day, month and year. If the value in the fields are not valid dates, an error is triggered (e.g. a month value smaller than 1 or larger than 12, or a day value smaller than 1 or larger than 31).

Two additional arguments can be given to this field comparator, namely max_day_a_before_b which is the maximal tolerated number of days that the date from data set A can be before the date from data set B, and max_day_b_before_a which is the maximal tolerated number of days that the date from data set B can be before the date from data set A. The default value for both arguments is $0$ days, which means only exact agreement is tolerated and all comparisons of different dates result in the disagreement weight being returned.

If day A is equal to or less than max_day_a_before_b days before day B, then a partial agreement weight is calculated using the following formula.

\begin{eqnarray*}
partial\_agreement & = & agree\_weight - \left( \frac{date\_di...
...b+1} \right) * \\
~& ~& (agree\_weight + abs(disagree\_weight))
\end{eqnarray*}


The case where day A is after day B is calculated similarly using the value of argument max_day_b_before_a.

If the day difference between the days is larger than max_day_a_before_b or max_day_b_before_a, respectively, then the disagreement weight will be returned.

For two special cases, partial weights are calculated as follows.

Note: Separate M- and U-probabilities have to be given for day, month and year. The general m_probability and u_probability arguments can not be used, instead use

m_probability_day
u_probability_day
m_probability_month
u_probability_month
m_probability_year
u_probability_year

In its current version no frequency dependent weight calculation is possible, thus the arguments frequency_table, freq_table_max_weight and freq_table_min_weight can not be used with this field comparator function.