Changeset 33803
- Timestamp:
- 08/29/2015 01:46:53 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/date.php
r32116 r33803 356 356 // Weeks per year. 357 357 if ( isset( $_year ) ) { 358 // If we have a specific year, use it to calculate number of weeks. 359 $date = new DateTime(); 360 $date->setISODate( $_year, 53 ); 361 $week_count = $date->format( "W" ) === "53" ? 53 : 52; 358 /* 359 * If we have a specific year, use it to calculate number of weeks. 360 * Note: the number of weeks in a year is the date in which Dec 28 appears. 361 */ 362 $week_count = date( 'W', mktime( 0, 0, 0, 12, 28, $_year ) ); 362 363 363 364 } else {
Note: See TracChangeset
for help on using the changeset viewer.