W3cubDocs

/Symfony 2.8

Symfony\Component\Finder\Comparator\DateComparator

class DateComparator extends Comparator

DateCompare compiles date comparisons.

Methods

string getTarget()

Gets the target value.

from Comparator
setTarget(string $target)

Sets the target value.

from Comparator
string getOperator()

Gets the comparison operator.

from Comparator
setOperator(string $operator)

Sets the comparison operator.

from Comparator
bool test(mixed $test)

Tests against the target.

from Comparator
__construct(string $test)

Constructor.

Details

public string getTarget()

Gets the target value.

Return Value

string The target value

public setTarget(string $target)

Sets the target value.

Parameters

string $target The target value

public string getOperator()

Gets the comparison operator.

Return Value

string The operator

public setOperator(string $operator)

Sets the comparison operator.

Parameters

string $operator A valid operator

Exceptions

InvalidArgumentException

public bool test(mixed $test)

Tests against the target.

Parameters

mixed $test A test value

Return Value

bool

public __construct(string $test)

Constructor.

Parameters

string $test A comparison string

Exceptions

InvalidArgumentException If the test is not understood

© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.8/Symfony/Component/Finder/Comparator/DateComparator.html