Advanced Search: Dates between

SVN:b1162[5507]
This commit is contained in:
Eric Espié
2018-03-23 13:33:09 +00:00
parent 27f41baa9a
commit 965e7b48df
4 changed files with 105 additions and 44 deletions

View File

@@ -30,7 +30,6 @@ use AttributeExternalKey;
use Combodo\iTop\Application\Search\AjaxSearchException;
use Combodo\iTop\Application\Search\CriterionConversionAbstract;
use Combodo\iTop\Application\Search\SearchForm;
use DateInterval;
class CriterionToOQL extends CriterionConversionAbstract
{
@@ -273,9 +272,8 @@ class CriterionToOQL extends CriterionConversionAbstract
if (!empty($sEndDate))
{
$oDate = $oFormat->parse($sEndDate);
$oDate->add(DateInterval::createFromDateString('1 second'));
$sEndDate = $oDate->format($sAttributeClass::GetSQLFormat());
$aOQL[] = "({$sRef} < '$sEndDate')";
$aOQL[] = "({$sRef} <= '$sEndDate')";
}
$sOQL = implode(' AND ', $aOQL);