= 9000 && $mls_id_int < 10000; } /** * Normalise a stored last-import date into a full OData DateTimeOffset literal. * * The plugin stores the last-import marker as 'Y-m-d\TH:i' (e.g. 2026-07-01T00:00), * which RESO Web API providers such as AMPRE reject in a * $filter=ModificationTimestamp comparison. This produces a UTC literal with a Z * offset (e.g. 2026-07-01T00:00:00.000Z). An empty input is returned unchanged so * callers can keep treating '' as "no incremental marker". * * @param string $last_date * @return string */ function mlsimport_format_odata_modification_time( $last_date ) { if ( '' === $last_date ) { return ''; } $date_time = new DateTime( $last_date, new DateTimeZone( 'UTC' ) ); return $date_time->format( 'Y-m-d\TH:i:s.000\Z' ); }