| 1162 | | $my_year = substr( $m, 0, 4 ); |
| 1163 | | $my_month = $wp_locale->get_month( substr( $m, 4, 2 ) ); |
| 1164 | | $my_day = intval( substr( $m, 6, 2 ) ); |
| 1165 | | $title = $my_year . ( $my_month ? $t_sep . $my_month : '' ) . ( $my_day ? $t_sep . $my_day : '' ); |
| | 1162 | // First add the year. |
| | 1163 | $date_parts = array( substr( $m, 0, 4 ) ); |
| | 1164 | |
| | 1165 | // is_time, is_day and is_month are mutually exclusive thus all need to be checked. |
| | 1166 | if ( is_time() || is_day() || is_month() ) { |
| | 1167 | // Then add the month. |
| | 1168 | $date_parts[] = $wp_locale->get_month( substr( $m, 4, 2 ) ); |
| | 1169 | } |
| | 1170 | |
| | 1171 | if ( is_time() || is_day() ) { |
| | 1172 | // Then add the day. |
| | 1173 | $date_parts[] = (int) substr( $m, 6, 2 ); |
| | 1174 | } |
| | 1175 | |
| | 1176 | $title = implode( $t_sep, $date_parts ); |