diff --git a/wp-includes/date.php b/wp-includes/date.php index 2e903a2518..9f64747bb3 100644 --- a/wp-includes/date.php +++ b/wp-includes/date.php @@ -355,10 +355,11 @@ class WP_Date_Query { // Weeks per year. if ( isset( $_year ) ) { - // If we have a specific year, use it to calculate number of weeks. - $date = new DateTime(); - $date->setISODate( $_year, 53 ); - $week_count = $date->format( "W" ) === "53" ? 53 : 52; + /* + * If we have a specific year, use it to calculate number of weeks. + * Note: the number of weeks in a year is the date in which Dec 28 appears. + */ + $week_count = date( 'W', mktime( 0, 0, 0, 12, 28, $_year ) ); } else { // Otherwise set the week-count to a maximum of 53. diff --git a/wp-includes/version.php b/wp-includes/version.php index 03a868bdf7..ed4559ef72 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-33802'; +$wp_version = '4.4-alpha-33803'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.