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

Inheritance: use trait Webiny\Component\StdLib\ValidatorTrait
Afficher le fichier Open project: Webiny/Framework

Méthodes publiques

Méthode 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 méthode

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

isLeap() public méthode

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

isPast() public méthode

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

largerThan() public méthode

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.
Résultat boolean Boolean true if current date object is larger than the provided $time.

smallerThan() public méthode

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