From 46dd0a79f65cd8631bb0510b1cd3e52b028b89f6 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 21 Jan 2020 23:48:04 +0000 Subject: [PATCH] =?UTF-8?q?Date/Time:=20In=20`wp=5Fmaybe=5Fdecline=5Fdate(?= =?UTF-8?q?)`,=20add=20support=20for=20a=20range=20of=20days,=20e.g.=20`Fe?= =?UTF-8?q?bruary=2021=E2=80=9323`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A potential use case is displaying multi-day events in the WordPress Events and News dashboard widget. See #47798, #48934. Built from https://develop.svn.wordpress.org/trunk@47098 git-svn-id: http://core.svn.wordpress.org/trunk@46898 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 5d39f9b220..67a6cd6dc5 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -373,11 +373,11 @@ function wp_maybe_decline_date( $date, $format = '' ) { if ( $decline ) { foreach ( $months as $key => $month ) { - $months[ $key ] = '#\b' . preg_quote( $month, '#' ) . ' (\d{1,2})(st|nd|rd|th)?\b#u'; + $months[ $key ] = '#\b' . preg_quote( $month, '#' ) . ' (\d{1,2})(st|nd|rd|th)?([-–]\d{1,2})?(st|nd|rd|th)?\b#u'; } foreach ( $months_genitive as $key => $month ) { - $months_genitive[ $key ] = '$1 ' . $month; + $months_genitive[ $key ] = '$1$3 ' . $month; } $date = preg_replace( $months, $months_genitive, $date ); diff --git a/wp-includes/version.php b/wp-includes/version.php index f5611ad21c..54584524f3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.4-alpha-47097'; +$wp_version = '5.4-alpha-47098'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.