WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Admin\API\Reports

TimeInterval::default_before() public WC 1.0

Returns default 'before' parameter for the reports.

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

No Hooks.

Return

DateTime.

Usage

$result = TimeInterval::default_before();

Code of TimeInterval::default_before() WC 6.1.1

public static function default_before() {
	$datetime = new \WC_DateTime();
	// Set local timezone or offset.
	if ( get_option( 'timezone_string' ) ) {
		$datetime->setTimezone( new \DateTimeZone( wc_timezone_string() ) );
	} else {
		$datetime->set_utc_offset( wc_timezone_offset() );
	}
	return $datetime;
}