\Cake\Chronos\TraitsRelativeKeywordTrait

Provides methods for testing if strings contain relative keywords.

Summary

Methods
Properties
Constants
hasRelativeKeywords()
No public properties found
No constants found
No protected methods found
$relativePattern
N/A
No private methods found
No private properties found
N/A

Properties

$relativePattern

$relativePattern : 

Type

Methods

hasRelativeKeywords()

hasRelativeKeywords(string  $time) : boolean

Determine if there is a relative keyword in the time string, this is to create dates relative to now for test instances. e.g.: next tuesday

Parameters

string $time

The time string to check.

Returns

boolean —

true if there is a keyword, otherwise false