PHP Trait Webiny\Component\StdLib\StdObject\DateTimeObject\ValidatorTrait

Inheritance: use trait Webiny\Component\StdLib\ValidatorTrait
Datei anzeigen Open project: Webiny/Framework

Public Methods

Method Description
isFuture ( ) : boolean Check if current DateTimeObject is in future.
isLeap ( ) : string Check if current DateTimeObject is a leap year.
isPast ( ) : boolean Check if current DateTimeObject is in past.
largerThan ( integer | string | DateTime | DateTimeObject $time ) : boolean Check if current datetime is larger than $time.
smallerThan ( integer | string | DateTime | DateTimeObject $time ) : boolean Check if current datetime smaller than $time.

Method Details

isFuture() public method

Check if current DateTimeObject is in future.
public isFuture ( ) : boolean
return boolean Boolean true if the date is in the future. Otherwise false.

isLeap() public method

Check if current DateTimeObject is a leap year.
public isLeap ( ) : string
return string Boolean true if it's a leap year.

isPast() public method

Check if current DateTimeObject is in past.
public isPast ( ) : boolean
return boolean Boolean true if the date is in the past. Otherwise false.

largerThan() public method

Check if current datetime is larger than $time.
public largerThan ( integer | string | DateTime | DateTimeObject $time ) : boolean
$time integer | string | DateTime | DateTimeObject Date to compare to.
return boolean Boolean true if current date object is larger than the provided $time.

smallerThan() public method

Check if current datetime smaller than $time.
public smallerThan ( integer | string | DateTime | DateTimeObject $time ) : boolean
$time integer | string | DateTime | DateTimeObject Date to compare to.
return boolean Boolean true if current date object is smaller than the provided $time.