WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Admin\API\Reports

TimeInterval::next_day_start() public WC 1.0

Returns a new DateTime object representing the next day start, or previous day end if reversed.

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

No Hooks.

Return

DateTime.

Usage

$result = TimeInterval::next_day_start( $datetime, $reversed );
$datetime(DateTime) (required)
Date and time.
$reversed(true|false)
Going backwards in time instead of forward.
Default: false

Code of TimeInterval::next_day_start() WC 6.1.0

public static function next_day_start( $datetime, $reversed = false ) {
	$oneday       = new \DateInterval( 'P1D' );
	$new_datetime = clone $datetime;

	if ( $reversed ) {
		$new_datetime->sub( $oneday );
		$new_datetime->setTime( 23, 59, 59 );
	} else {
		$new_datetime->add( $oneday );
		$new_datetime->setTime( 0, 0, 0 );
	}

	return $new_datetime;
}