Front Month Determination

How does the API determine front month status for a particular contract? Is it based on a fixed time to expiration?

As an example, I just queried contract maturities for Chicago wheat (ZW). The API is suggesting the July expiration for the front month. CME Group’s contract summary webpage is suggesting the September contract, likely because of daily relative volume.