Some fixes for get_weekstartend() docs.

see #26185.
Built from https://develop.svn.wordpress.org/trunk@28937


git-svn-id: http://core.svn.wordpress.org/trunk@28735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2014-07-01 14:59:15 +00:00
parent 300c53e6fe
commit 440c78d405
1 changed files with 7 additions and 7 deletions

View File

@ -216,25 +216,25 @@ function size_format( $bytes, $decimals = 0 ) {
} }
/** /**
* Get the week start and end from the datetime or date string from mysql. * Get the week start and end from the datetime or date string from MySQL.
* *
* @since 0.71 * @since 0.71
* *
* @param string $mysqlstring Date or datetime field type from mysql. * @param string $mysqlstring Date or datetime field type from MySQL.
* @param int $start_of_week Optional. Start of the week as an integer. * @param int|string $start_of_week Optional. Start of the week as an integer. Default empty string.
* @return array Keys are 'start' and 'end'. * @return array Keys are 'start' and 'end'.
*/ */
function get_weekstartend( $mysqlstring, $start_of_week = '' ) { function get_weekstartend( $mysqlstring, $start_of_week = '' ) {
// Mysql string year. // MySQL string year.
$my = substr( $mysqlstring, 0, 4 ); $my = substr( $mysqlstring, 0, 4 );
// Mysql string month. // MySQL string month.
$mm = substr( $mysqlstring, 8, 2 ); $mm = substr( $mysqlstring, 8, 2 );
// Mysql string day. // MySQL string day.
$md = substr( $mysqlstring, 5, 2 ); $md = substr( $mysqlstring, 5, 2 );
// The timestamp for mysqlstring day. // The timestamp for MySQL string day.
$day = mktime( 0, 0, 0, $md, $mm, $my ); $day = mktime( 0, 0, 0, $md, $mm, $my );
// The day of the week from the timestamp. // The day of the week from the timestamp.