WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API\Reports

TimeInterval::intervals_missing() public WC 1.0

Returns true if there are any intervals that need to be filled in the response.

{} It's a method of the class: TimeInterval{}

No Hooks.

Return

true|false. Nothing.

Usage

$result = TimeInterval::intervals_missing( $expected_interval_count, $db_records, $items_per_page, $page_no, $order, $order_by, $intervals_count );
$expected_interval_count(int) (required)
Expected number of intervals in total.
$db_records(int) (required)
Total number of records for given period in the database.
$items_per_page(int) (required)
Number of items per page.
$page_no(int) (required)
Page number.
$order(string) (required)
asc or desc.
$order_by(string) (required)
Column by which the result will be sorted.
$intervals_count(int) (required)
Number of records for given (possibly shortened) time interval.

Code of TimeInterval::intervals_missing() WC 5.3.0

<?php
public static function intervals_missing( $expected_interval_count, $db_records, $items_per_page, $page_no, $order, $order_by, $intervals_count ) {
	if ( $expected_interval_count <= $db_records ) {
		return false;
	}
	if ( 'date' === $order_by ) {
		$expected_intervals_on_page = self::expected_intervals_on_page( $expected_interval_count, $items_per_page, $page_no );
		return $intervals_count < $expected_intervals_on_page;
	}
	if ( 'desc' === $order ) {
		return $page_no > floor( $db_records / $items_per_page );
	}
	if ( 'asc' === $order ) {
		return $page_no <= ceil( ( $expected_interval_count - $db_records ) / $items_per_page );
	}
	// Invalid ordering.
	return false;
}