Occurrence::latest()

Returns the Occurrence mode, if any , that ends last between all the Occurrences.


Return

(TECEventsCustom_TablesV1ModelsModel|null) Either the Model for the Occurrence entry that ends last, or null to indicate there are no Occurrences.


Top ↑

Source

File: src/Events/Custom_Tables/V1/Models/Occurrence.php

	public static function latest() {
		$column = Timezones::is_mode( 'site' ) ? 'end_date_utc' : 'end_date';

		return static::order_by( $column, 'DESC' )->first();
	}

Top ↑

Changelog

Changelog
Version Description
6.0.0 Introduced.