WordPress at a glance
function is not described

_wp_mysql_week() WP 3.0.0

Return a MySQL expression for selecting the week number based on the start_of_week option.

This is an internal function for using it by WP core itself. It's not recommended to use this function in your code.

No Hooks.

Return

String. SQL clause.

Usage

_wp_mysql_week( $column );
$column(string) (required)
Database column.

Changelog

Since 3.0.0 Introduced.

Code of _wp_mysql_week() WP 5.7

<?php
function _wp_mysql_week( $column ) {
	$start_of_week = (int) get_option( 'start_of_week' );
	switch ( $start_of_week ) {
		case 1:
			return "WEEK( $column, 1 )";
		case 2:
		case 3:
		case 4:
		case 5:
		case 6:
			return "WEEK( DATE_SUB( $column, INTERVAL $start_of_week DAY ), 0 )";
		case 0:
		default:
			return "WEEK( $column, 0 )";
	}
}