[wp-meta] [Making WordPress.org] #7056: Incorrect date formatting

Making WordPress.org noreply at wordpress.org
Fri Jun 16 02:41:40 UTC 2023


#7056: Incorrect date formatting
--------------------------------------+--------------------------------
 Reporter:  xavivars                  |       Owner:  (none)
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:
Component:  Make (Get Involved) / P2  |  Resolution:  reported-upstream
 Keywords:                            |
--------------------------------------+--------------------------------
Changes (by dd32):

 * status:  new => closed
 * resolution:   => reported-upstream


Comment:

 It seems this is coming from the `date_format` being set to `j \d\e F \d\e
 Y` (This is likely coming from a GlotPress translated string)

 That's then escaped to `"dateFormat":"j \\d\\e F \\d\\e Y"` when output as
 part of `o2` settings, and it's then converted over to Moment.js date
 format in
 https://github.com/Automattic/o2/blob/master/js/utils/timestamp.js

 It looks like the above o2 code doesn't handle escaped characters. I've
 filed an upstream issue: https://github.com/Automattic/o2/issues/226

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/7056#comment:4>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list