mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-01 23:24:12 +01:00
Advanced Search: Dates between
SVN:b1162[5499]
This commit is contained in:
@@ -260,7 +260,8 @@ class CriterionToSearchForm extends CriterionConversionAbstract
|
||||
$sFirstDate = $aCurrCriterion['values'][0]['value'];
|
||||
$oDate = new DateTime($sLastDate);
|
||||
$aCurrCriterion['operator'] = 'between_dates';
|
||||
if ((strpos($sFirstDate, '00:00:00') != false) && (strpos($sLastDate, '00:00:00') != false))
|
||||
$sPattern = '@^[\d-]{10}( 00:00:00)?$@';
|
||||
if (preg_match($sPattern, $sFirstDate) && preg_match($sPattern, $sLastDate))
|
||||
{
|
||||
$sInterval = '1 day';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user