--- a/heuristics/metadataHeuristics.php +++ b/heuristics/metadataHeuristics.php @@ -1,3 +1,12 @@ - - duplicated description - - most duplicated overall, most duplicated per agency/category/supplier etc. - + "unusual value for time of year"); +function METADATA_DUPLICATED_DESCRIPTION($cn) +{ + $averageContractPeriod = getAverageContractPeriod(); + $diff = strtotime($cn['contractStart']) - strtotime($cn['publishDate']); + $days = intval($diff / 24); + return ($days > 45 ? 1 : 0); +}