mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Date/Time: Add support for the c
and r
shorthand formats in date_i18n()
.
Props Rarst, pbearne Fixes #20973 Built from https://develop.svn.wordpress.org/trunk@43434 git-svn-id: http://core.svn.wordpress.org/trunk@43261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4c2fcf36a3
commit
60252611be
@ -107,6 +107,9 @@ function date_i18n( $dateformatstring, $timestamp_with_offset = false, $gmt = fa
|
||||
*/
|
||||
$req_format = $dateformatstring;
|
||||
|
||||
$dateformatstring = preg_replace( "/(?<!\\\\)c/", DATE_W3C, $dateformatstring );
|
||||
$dateformatstring = preg_replace( "/(?<!\\\\)r/", DATE_RFC2822, $dateformatstring );
|
||||
|
||||
if ( ( ! empty( $wp_locale->month ) ) && ( ! empty( $wp_locale->weekday ) ) ) {
|
||||
$datemonth = $wp_locale->get_month( date( 'm', $i ) );
|
||||
$datemonth_abbrev = $wp_locale->get_month_abbrev( $datemonth );
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-alpha-43406';
|
||||
$wp_version = '5.0-alpha-43434';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user