You are here

public function Finder::date in Database Sanitize 7

Adds tests for file dates (last modified).

The date must be something that strtotime() is able to parse:

$finder->date('since yesterday'); $finder->date('until 2 days ago'); $finder->date('> now - 2 hours'); $finder->date('>= 2005-10-15');

Parameters

string $date A date range string:

Return value

$this

See also

strtotime

DateRangeFilterIterator

DateComparator

File

vendor/symfony/finder/Finder.php, line 143

Class

Finder
Finder allows to build rules to find files and directories.

Namespace

Symfony\Component\Finder

Code

public function date($date) {
  $this->dates[] = new Comparator\DateComparator($date);
  return $this;
}