[wp-trac] [WordPress Trac] #48741: Issue with wp_date()

WordPress Trac noreply at wordpress.org
Wed Nov 20 13:59:27 UTC 2019


#48741: Issue with wp_date()
--------------------------+-----------------------------
 Reporter:  Xendo         |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.3
 Severity:  critical      |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48741>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list