WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API\Reports

TimeInterval::quarter() public WC 1.0

Returns quarter for the DateTime.

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

No Hooks.

Return

Int|null. Nothing.

Usage

$result = TimeInterval::quarter( $datetime );
$datetime(DateTime) (required)
Local date & time.

Code of TimeInterval::quarter() WC 5.3.0

<?php
public static function quarter( $datetime ) {
	switch ( (int) $datetime->format( 'm' ) ) {
		case 1:
		case 2:
		case 3:
			return 1;
		case 4:
		case 5:
		case 6:
			return 2;
		case 7:
		case 8:
		case 9:
			return 3;
		case 10:
		case 11:
		case 12:
			return 4;

	}
	return null;
}