From 7d039b4e403fb395218919ab17102c5e35894ee5 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 6 Nov 2015 16:36:57 +0000 Subject: [PATCH] Replace `7 * DAY_IN_SECONDS` with `WEEK_IN_SECONDS` in `get_weekstartend()`. Props MikeHansenMe. Fixes #34603. git-svn-id: https://develop.svn.wordpress.org/trunk@35556 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index ca00b7c5bd..1b743d0bae 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -301,8 +301,8 @@ function get_weekstartend( $mysqlstring, $start_of_week = '' ) { // The most recent week start day on or before $day. $start = $day - DAY_IN_SECONDS * ( $weekday - $start_of_week ); - // $start + 7 days - 1 second. - $end = $start + 7 * DAY_IN_SECONDS - 1; + // $start + 1 week - 1 second. + $end = $start + WEEK_IN_SECONDS - 1; return compact( 'start', 'end' ); }