Source of file DateFilter.php
Size: 0,803 Bytes - Last Modified: 2021-12-24T05:15:56+00:00
/var/www/docs.ssmods.com/process/src/code/filters/DateFilter.php
123456789101112131415161718192021222324252627282930313233 | <?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * * @author Hudhaifa Shatnawi <hudhaifa.shatnawi@gmail.com> * @version 1.0, Nov 11, 2016 - 8:32:54 AM */ abstract class DateFilter extends PartialMatchFilter { protected function getDate() { $date = new Date(); $date->setValue($this->getValue()); return array( 'd' => $date->format('d'), 'm' => $date->format('m'), 'y' => $date->format('Y') ); } protected function applyOne(\DataQuery $query) { return $this->applyOneDate($query); } abstract protected function applyOneDate(DataQuery $query); } |