for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Conditions\RecordFields;
/**
* Datetime field condition record field class.
*
* @package UIType
* @copyright YetiForce S.A.
* @license YetiForce Public License 5.0 (licenses/LicenseEN.txt or yetiforce.com)
* @author Mariusz Krzaczkowski <[email protected]>
*/
class DatetimeField extends DateField
{
* Between operator.
* @return array
public function operatorBw()
[$startDate, $endDate] = explode(',', $this->value);
$dateValue = date('Y-m-d H:i:s', strtotime($this->getValue()));
return ($dateValue >= date('Y-m-d H:i:s', strtotime($startDate))) && ($dateValue <= date('Y-m-d H:i:s', strtotime($endDate)));
return $dateValue >= dat...', strtotime($endDate))
boolean
array
}
* Smaller operator.
* @return bool
public function operatorSmaller()
return strtotime($this->getValue()) < strtotime('now');
* Greater operator.
public function operatorGreater()
return strtotime($this->getValue()) > strtotime('now');