Changeset 30142 for trunk/src/wp-includes/date.php
- Timestamp:
- 11/01/2014 03:23:15 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/date.php
r29938 r30142 61 61 * @var array 62 62 */ 63 public $time_keys = array( 'after', 'before', 'year', 'month', 'monthnum', 'week', 'w', 'dayofyear', 'day', 'dayofweek', ' hour', 'minute', 'second' );63 public $time_keys = array( 'after', 'before', 'year', 'month', 'monthnum', 'week', 'w', 'dayofyear', 'day', 'dayofweek', 'dayofweek_iso', 'hour', 'minute', 'second' ); 64 64 65 65 /** … … 68 68 * @since 3.7.0 69 69 * @since 4.0.0 The $inclusive logic was updated to include all times within the date range. 70 * @since 4.1.0 Introduced 'dayofweek_iso' time type parameter. 70 71 * @access public 71 72 * … … 117 118 * @type int $dayofyear Optional. The day number of the year. Default empty. Accepts numbers 1-366. 118 119 * @type int $day Optional. The day of the month. Default empty. Accepts numbers 1-31. 119 * @type int $dayofweek Optional. The day number of the week. Default empty. Accepts numbers 1-7. 120 * @type int $dayofweek Optional. The day number of the week. Default empty. Accepts numbers 1-7 (1 is Sunday). 121 * @type int $dayofweek_iso Optional. The day number of the week (ISO). Default empty. 122 * Accepts numbers 1-7 (1 is Monday). 120 123 * @type int $hour Optional. The hour of the day. Default empty. Accepts numbers 0-23. 121 124 * @type int $minute Optional. The minute of the hour. Default empty. Accepts numbers 0-60. … … 310 313 // Days per week. 311 314 $min_max_checks['dayofweek'] = array( 315 'min' => 1, 316 'max' => 7 317 ); 318 319 // Days per week. 320 $min_max_checks['dayofweek_iso'] = array( 312 321 'min' => 1, 313 322 'max' => 7 … … 728 737 $where_parts[] = "DAYOFWEEK( $column ) $compare $value"; 729 738 739 if ( isset( $query['dayofweek_iso'] ) && $value = $this->build_value( $compare, $query['dayofweek_iso'] ) ) 740 $where_parts[] = "WEEKDAY( $column ) + 1 $compare $value"; 741 730 742 if ( isset( $query['hour'] ) || isset( $query['minute'] ) || isset( $query['second'] ) ) { 731 743 // Avoid notices.
Note: See TracChangeset
for help on using the changeset viewer.