Occurrence::earliest()
Returns the Occurrence model instance, if any , that starts first between all the Occurrences.
Return
(TECEventsCustom_TablesV1ModelsModel|null) Either the Model for the Occurrence entry that starts first, or null to indicate there are no Occurrences.
Source
File: src/Events/Custom_Tables/V1/Models/Occurrence.php
public static function earliest() {
$column = Timezones::is_mode( 'site' ) ? 'start_date_utc' : 'start_date';
return self::order_by( $column )->first();
}
Changelog
| Version | Description |
|---|---|
| 6.0.0 | Introduced. |