Make WordPress Core

Changeset 28937


Ignore:
Timestamp:
07/01/2014 02:58:37 PM (10 years ago)
Author:
SergeyBiryukov
Message:

Some fixes for get_weekstartend() docs.

see #26185.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r28936 r28937  
    217217
    218218/**
    219  * Get the week start and end from the datetime or date string from mysql.
     219 * Get the week start and end from the datetime or date string from MySQL.
    220220 *
    221221 * @since 0.71
    222222 *
    223  * @param string $mysqlstring Date or datetime field type from mysql.
    224  * @param int $start_of_week Optional. Start of the week as an integer.
     223 * @param string     $mysqlstring   Date or datetime field type from MySQL.
     224 * @param int|string $start_of_week Optional. Start of the week as an integer. Default empty string.
    225225 * @return array Keys are 'start' and 'end'.
    226226 */
    227227function get_weekstartend( $mysqlstring, $start_of_week = '' ) {
    228     // Mysql string year.
     228    // MySQL string year.
    229229    $my = substr( $mysqlstring, 0, 4 );
    230230
    231     // Mysql string month.
     231    // MySQL string month.
    232232    $mm = substr( $mysqlstring, 8, 2 );
    233233
    234     // Mysql string day.
     234    // MySQL string day.
    235235    $md = substr( $mysqlstring, 5, 2 );
    236236
    237     // The timestamp for mysqlstring day.
     237    // The timestamp for MySQL string day.
    238238    $day = mktime( 0, 0, 0, $md, $mm, $my );
    239239
Note: See TracChangeset for help on using the changeset viewer.