Changeset 47122 for trunk/src/wp-includes/class-wp-date-query.php
- Timestamp:
- 01/29/2020 12:43:23 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-date-query.php
r45932 r47122 274 274 * This method only generates debug notices for these cases. 275 275 * 276 * @since 276 * @since 4.1.0 277 277 * 278 278 * @param array $date_query The date_query array. … … 316 316 $max_days_of_year = gmdate( 'z', mktime( 0, 0, 0, 12, 31, $_year ) ) + 1; 317 317 } else { 318 // otherwise we use the max of 366 (leap-year)318 // Otherwise we use the max of 366 (leap-year). 319 319 $max_days_of_year = 366; 320 320 } … … 676 676 * compatibility while retaining the naming convention across Query classes. 677 677 * 678 * @since 678 * @since 3.7.0 679 679 * 680 680 * @param array $query Date query arguments. … … 693 693 * Turns a first-order date query into SQL for a WHERE clause. 694 694 * 695 * @since 695 * @since 4.1.0 696 696 * 697 697 * @param array $query Date query clause. … … 746 746 ); 747 747 748 // Check of the possible date units and add them to the query 748 // Check of the possible date units and add them to the query. 749 749 foreach ( $date_units as $sql_part => $query_parts ) { 750 750 foreach ( $query_parts as $query_part ) { … … 967 967 global $wpdb; 968 968 969 // Have to have at least one 969 // Have to have at least one. 970 970 if ( ! isset( $hour ) && ! isset( $minute ) && ! isset( $second ) ) { 971 971 return false; 972 972 } 973 973 974 // Complex combined queries aren't supported for multi-value queries 974 // Complex combined queries aren't supported for multi-value queries. 975 975 if ( in_array( $compare, array( 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN' ) ) ) { 976 976 $return = array(); … … 994 994 } 995 995 996 // Cases where just one unit is set 996 // Cases where just one unit is set. 997 997 if ( isset( $hour ) && ! isset( $minute ) && ! isset( $second ) ) { 998 998 $value = $this->build_value( $compare, $hour ); … … 1020 1020 $time = ''; 1021 1021 1022 // Hour 1022 // Hour. 1023 1023 if ( null !== $hour ) { 1024 1024 $format .= '%H.'; … … 1029 1029 } 1030 1030 1031 // Minute 1031 // Minute. 1032 1032 $format .= '%i'; 1033 1033 $time .= sprintf( '%02d', $minute );
Note: See TracChangeset
for help on using the changeset viewer.