\app\framework\Component\StdLib\StdObject\DateTimeObjectValidatorTrait

DateObject validator

Summary

Methods
Properties
Constants
isLeap()
isFuture()
isPast()
largerThan()
smallerThan()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

isLeap()

isLeap() : string

Check if current DateTimeObject is a leap year.

Returns

string —

Boolean true if it's a leap year.

isFuture()

isFuture() : boolean

Check if current DateTimeObject is in future.

Returns

boolean —

Boolean true if the date is in the future. Otherwise false.

isPast()

isPast() : boolean

Check if current DateTimeObject is in past.

Returns

boolean —

Boolean true if the date is in the past. Otherwise false.

largerThan()

largerThan(integer|string|\DateTime|\app\framework\Component\StdLib\StdObject\DateTimeObject\DateTimeObject  $time) : boolean

Check if current datetime is larger than $time.

Parameters

integer|string|\DateTime|\app\framework\Component\StdLib\StdObject\DateTimeObject\DateTimeObject $time

Date to compare to.

Returns

boolean —

Boolean true if current date object is larger than the provided $time.

smallerThan()

smallerThan(integer|string|\DateTime|\app\framework\Component\StdLib\StdObject\DateTimeObject\DateTimeObject  $time) : boolean

Check if current datetime smaller than $time.

Parameters

integer|string|\DateTime|\app\framework\Component\StdLib\StdObject\DateTimeObject\DateTimeObject $time

Date to compare to.

Returns

boolean —

Boolean true if current date object is smaller than the provided $time.