id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses 39991,jQuery UI Datepicker Localization Error with PHP date 'S',devonto,,"When localising the datepicker, the UK default WordPress date format is not converted correctly to jQuery UI's format. The default PHP format for the UK is `jS F Y` The script-loader.php function `wp_localize_jquery_ui_datepicker()` converts this to `dS MM YY`, however the `S` is invalid and an ordinal suffix cannot be created with the datepicker. There is no easy solution to add in the ordinal suffix, but a better solution than printing the stray `S` is to strip this out by modifying the `str_replace()` function call to do so. {{{ // Convert the PHP date format into jQuery UI's format. $datepicker_date_format = str_replace( array( 'd', 'j', 'l', 'z', // Day. 'F', 'M', 'n', 'm', // Month. 'Y', 'y', // Year. 'S' // Invalid ), array( 'dd', 'd', 'DD', 'o', 'MM', 'M', 'm', 'mm', 'yy', 'y', '' ), get_option( 'date_format' ) ); }}} ",defect (bug),new,normal,Future Release,Script Loader,4.6,normal,,has-patch needs-refresh,,