Changeset 28937
- Timestamp:
- 07/01/2014 02:58:37 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r28936 r28937 217 217 218 218 /** 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. 220 220 * 221 221 * @since 0.71 222 222 * 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. 225 225 * @return array Keys are 'start' and 'end'. 226 226 */ 227 227 function get_weekstartend( $mysqlstring, $start_of_week = '' ) { 228 // My sqlstring year.228 // MySQL string year. 229 229 $my = substr( $mysqlstring, 0, 4 ); 230 230 231 // My sqlstring month.231 // MySQL string month. 232 232 $mm = substr( $mysqlstring, 8, 2 ); 233 233 234 // My sqlstring day.234 // MySQL string day. 235 235 $md = substr( $mysqlstring, 5, 2 ); 236 236 237 // The timestamp for mysqlstring day.237 // The timestamp for MySQL string day. 238 238 $day = mktime( 0, 0, 0, $md, $mm, $my ); 239 239
Note: See TracChangeset
for help on using the changeset viewer.