Make WordPress Core

Changeset 31862


Ignore:
Timestamp:
03/23/2015 02:13:50 AM (10 years ago)
Author:
dd32
Message:

Remove ambiguity in the time display format in core, switches to using 24hr notation where am/pm isn't specified.

  • H:i - 09:54
  • g:i a - 9:54 am
  • F j, Y - January 3, 2015

These shouldn't be used without a/A (am/AM)

  • h:i - 01:23
  • G:i - 1:23

Props iseulde. Fixes #31121

Location:
trunk/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-form-advanced.php

    r31681 r31862  
    9090     9 => sprintf( __('Post scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview post</a>'),
    9191        /* translators: Publish box date format, see http://php.net/date */
    92         date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( $permalink ) ),
     92        date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_date ) ), esc_url( $permalink ) ),
    9393    10 => sprintf( __('Post draft updated. <a target="_blank" href="%s">Preview post</a>'), esc_url( add_query_arg( 'preview', 'true', $permalink ) ) ),
    9494);
     
    103103     7 => __('Page saved.'),
    104104     8 => sprintf( __('Page submitted. <a target="_blank" href="%s">Preview page</a>'), esc_url( add_query_arg( 'preview', 'true', $permalink ) ) ),
    105      9 => sprintf( __('Page scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview page</a>'), date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ), esc_url( $permalink ) ),
     105     9 => sprintf( __('Page scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview page</a>'), date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_date ) ), esc_url( $permalink ) ),
    106106    10 => sprintf( __('Page draft updated. <a target="_blank" href="%s">Preview page</a>'), esc_url( add_query_arg( 'preview', 'true', $permalink ) ) ),
    107107);
  • trunk/src/wp-admin/edit-form-comment.php

    r31776 r31862  
    101101<?php
    102102/* translators: Publish box date format, see http://php.net/date */
    103 $datef = __( 'M j, Y @ G:i' );
     103$datef = __( 'M j, Y @ H:i' );
    104104$stamp = __('Submitted on: <b>%1$s</b>');
    105105$date = date_i18n( $datef, strtotime( $comment->comment_date ) );
  • trunk/src/wp-admin/includes/class-wp-comments-list-table.php

    r31681 r31862  
    547547
    548548    public function column_date() {
    549         return get_comment_date( __( 'Y/m/d \a\t g:ia' ) );
     549        return get_comment_date( __( 'Y/m/d \a\t g:i a' ) );
    550550    }
    551551
  • trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php

    r31333 r31862  
    447447            $action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin );
    448448
    449             $date_format = __( 'M j, Y @ G:i' );
     449            $date_format = __( 'M j, Y @ H:i' );
    450450            $last_updated_timestamp = strtotime( $plugin['last_updated'] );
    451451        ?>
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r31841 r31862  
    822822                    $time_diff = 0;
    823823                } else {
    824                     $t_time = get_the_time( __( 'Y/m/d g:i:s A' ) );
     824                    $t_time = get_the_time( __( 'Y/m/d g:i:s a' ) );
    825825                    $m_time = $post->post_date;
    826826                    $time = get_post_time( 'G', true, $post );
  • trunk/src/wp-admin/includes/meta-boxes.php

    r31830 r31862  
    163163<?php
    164164/* translators: Publish box date format, see http://php.net/date */
    165 $datef = __( 'M j, Y @ G:i' );
     165$datef = __( 'M j, Y @ H:i' );
    166166if ( 0 != $post->ID ) {
    167167    if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
     
    294294    <?php
    295295    /* translators: Publish box date format, see http://php.net/date */
    296     $datef = __( 'M j, Y @ G:i' );
     296    $datef = __( 'M j, Y @ H:i' );
    297297    $stamp = __('Uploaded on: <b>%1$s</b>');
    298298    $date = date_i18n( $datef, strtotime( $post->post_date ) );
  • trunk/src/wp-admin/includes/plugin-install.php

    r31829 r31862  
    441441    echo "</div>\n";
    442442
    443     $date_format = __( 'M j, Y @ G:i' );
     443    $date_format = __( 'M j, Y @ H:i' );
    444444    $last_updated_timestamp = strtotime( $api->last_updated );
    445445    ?>
  • trunk/src/wp-admin/includes/revision.php

    r31471 r31862  
    204204            'title'      => get_the_title( $post->ID ),
    205205            'author'     => $authors[ $revision->post_author ],
    206             'date'       => date_i18n( __( 'M j, Y @ G:i' ), $modified ),
    207             'dateShort'  => date_i18n( _x( 'j M @ G:i', 'revision date short format' ), $modified ),
     206            'date'       => date_i18n( __( 'M j, Y @ H:i' ), $modified ),
     207            'dateShort'  => date_i18n( _x( 'j M @ H:i', 'revision date short format' ), $modified ),
    208208            'timeAgo'    => sprintf( __( '%s ago' ), human_time_diff( $modified_gmt, $now_gmt ) ),
    209209            'autosave'   => $autosave,
     
    222222            'title'      => get_the_title( $post->ID ),
    223223            'author'     => $authors[ $post->post_author ],
    224             'date'       => date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_modified ) ),
    225             'dateShort'  => date_i18n( _x( 'j M @ G:i', 'revision date short format' ), strtotime( $post->post_modified ) ),
     224            'date'       => date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_modified ) ),
     225            'dateShort'  => date_i18n( _x( 'j M @ H:i', 'revision date short format' ), strtotime( $post->post_modified ) ),
    226226            'timeAgo'    => sprintf( __( '%s ago' ), human_time_diff( strtotime( $post->post_modified_gmt ), $now_gmt ) ),
    227227            'autosave'   => false,
  • trunk/src/wp-admin/options-general.php

    r31124 r31862  
    1919$parent_file = 'options-general.php';
    2020/* translators: date and time format for exact current time, mainly about timezones, see http://php.net/date */
    21 $timezone_format = _x('Y-m-d G:i:s', 'timezone date format');
     21$timezone_format = _x('Y-m-d H:i:s', 'timezone date format');
    2222
    2323/**
  • trunk/src/wp-includes/post-template.php

    r31754 r31862  
    17011701
    17021702    /* translators: revision date format, see http://php.net/date */
    1703     $datef = _x( 'j F, Y @ G:i', 'revision date format');
     1703    $datef = _x( 'F j, Y @ H:i', 'revision date format');
    17041704    /* translators: 1: date */
    17051705    $autosavef = _x( '%1$s [Autosave]', 'post revision title extra' );
     
    17371737    $author = get_the_author_meta( 'display_name', $revision->post_author );
    17381738    /* translators: revision date format, see http://php.net/date */
    1739     $datef = _x( 'j F, Y @ G:i:s', 'revision date format');
     1739    $datef = _x( 'F j, Y @ H:i:s', 'revision date format');
    17401740
    17411741    $gravatar = get_avatar( $revision->post_author, 24 );
Note: See TracChangeset for help on using the changeset viewer.