本文整理汇总了PHP中plgFabrik_Element::greaterOrLessThan方法的典型用法代码示例。如果您正苦于以下问题:PHP plgFabrik_Element::greaterOrLessThan方法的具体用法?PHP plgFabrik_Element::greaterOrLessThan怎么用?PHP plgFabrik_Element::greaterOrLessThan使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类plgFabrik_Element
的用法示例。
在下文中一共展示了plgFabrik_Element::greaterOrLessThan方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: greaterOrLessThan
/**
* Used by validations
*
* @param string $data this elements data
* @param string $cond what condiion to apply
* @param string $compare data to compare element's data to (if date already set to Y-m-d H:I:S so no need to apply storeDatabaseForm() on it
*
* @return bool
*/
public function greaterOrLessThan($data, $cond, $compare)
{
$data = $this->storeDatabaseFormat($data, null);
/**
* $$$ rob 30/06/2011 the line below was commented out - but if doing date compare on 2 fields
* formatting %d/%m/%Y then the compare unix time was not right
*/
$compare = $this->storeDatabaseFormat($compare, null);
$data = JFactory::getDate($data)->toUnix();
$compare = JFactory::getDate($compare)->toUnix();
return parent::greaterOrLessThan($data, $cond, $compare);
}