/** * Returns the earliest known event start date, which can be expected to be a string * in MySQL datetime format (unless some other specific format is provided). * * If this is impossible to determine it will return boolean false. * * @category Events * * @param string $format * * @return mixed bool|string */ function tribe_events_earliest_date($format = Tribe__Date_Utils::DBDATETIMEFORMAT) { // Check if the earliest start date is already known $earliest = tribe_get_option('earliest_date', false); if (false !== $earliest) { return Tribe__Date_Utils::reformat($earliest, $format); } // If not, try to determine now Tribe__Events__Main::instance()->rebuild_known_range(); $earliest = tribe_get_option('earliest_date', false); if (false !== $earliest) { return Tribe__Date_Utils::reformat($earliest, $format); } return false; }
/** * Handler for the date column * * @param $item * * @return string */ public function column_date($item) { return Tribe__Date_Utils::reformat($item['completed_at'], Tribe__Date_Utils::DATEONLYFORMAT); }