WordPress.org

Make WordPress Core

Opened 9 months ago

Closed 9 months ago

#48741 closed defect (bug) (duplicate)

Issue with wp_date()

Reported by: Xendo Owned by:
Milestone: Priority: normal
Severity: critical Version: 5.3
Component: Date/Time Keywords:
Focuses: Cc:

Description

After upgrading to WordPress 5.3,
all dates of an events website are compromised:
using the format: l d F Y
instead of returning: Venerdì 15 Novembre 2019
returns: Venerdì 15 20 Novembre19
The year is split by the month.
I was using:
date_i18n( $format = 'l d F Y', strtotime( $event_date ) );

Doing some checks I saw the new wp_date().
I tried on a new blank installation with default TwentyTwenty theme,
simply by echoing:
wp_date( 'l d F Y', strtotime( 'tomorrow' ) );

and it echoes:
giovedì 21 20 Novembre19
while adding a blank space between F and Y (or a dash) works:
'l d F Y' => giovedì 21 Novembre 2019.
'l d F-Y' => giovedì 21 Novembre-2019.

It seems only affects italian language so there should be an issue with REGEX and / or localization, when Y follows F and a single whitespace.

Thanks

Change History (1)

#1 @SergeyBiryukov
9 months ago

  • Component changed from General to Date/Time
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi there, welcome to WordPress Trac!

Thanks for the report, we're already tracking this issue in #48606.

Note: See TracTickets for help on using tickets.