[wp-trac] [WordPress Trac] #39222: Add JavaScript date helpers

WordPress Trac noreply at wordpress.org
Fri May 12 00:16:52 UTC 2017

#39222: Add JavaScript date helpers
 Reporter:  rmccue                                 |       Owner:  rmccue
     Type:  feature request                        |      Status:  assigned
 Priority:  normal                                 |   Milestone:  4.8
Component:  Date/Time                              |     Version:  4.7
 Severity:  normal                                 |  Resolution:
 Keywords:  needs-docs needs-patch has-unit-tests  |     Focuses:  rest-api
Changes (by timmydcrawford):

 * keywords:  needs-unit-tests needs-docs needs-patch => needs-docs needs-
     patch has-unit-tests


 The last diff didn't apply cleanly to trunk for me, but
 [[attachment:39222.3.diff]] should apply cleanly now.  I added @aduth 's
 suggested change to {{{dateI18n}}} naming and applied a few other
 formatting changes like declaring {{{var}}}s on the first line in
 closures, and not over-writing argument variables ( not sure if this is a
 standard, but one we followed in the Media Widgets ).

 I also discovered a bug in {{{format()}}} logic where
 {{{wp.date.formatMap}}} methods were being called with the date argument -
 which could be a string, instead of the {{{momentDate}}} instance.  And
 some qunit test coverage has been added.

Ticket URL: <https://core.trac.wordpress.org/ticket/39222#comment:29>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list