Tribe__Tickets__Ticket_Object::date_is_earlier( null|string $datetime = null )
Determines if the given date is before the ticket’s start date
Contents
Parameters
- $datetime
-
(null|string) (Optional) The date/time that we want to compare to the ticket's start date
Default value: null
Return
(boolean) Whether or not the provided date/time is before than the ticket's start date
Source
File: src/Tribe/Ticket_Object.php
public function date_is_earlier( $datetime ) {
if ( is_numeric( $datetime ) ) {
$timestamp = $datetime;
} else {
$timestamp = strtotime( $datetime );
}
$start_date = $this->start_date();
return empty( $start_date ) || $timestamp < $start_date;
}