function Finder::date
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'); $finder->date(['>= 2005-10-15', '<= 2006-05-27']);
Parameters
string|string[] $dates A date range string or an array of date ranges:
Return value
$this
See also
strtotime
File
-
vendor/
symfony/ finder/ Finder.php, line 152
Class
- Finder
- Finder allows to build rules to find files and directories.
Namespace
Symfony\Component\FinderCode
public function date(string|array $dates) : static {
foreach ((array) $dates as $date) {
$this->dates[] = new DateComparator($date);
}
return $this;
}