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

WordPress Trac noreply at wordpress.org
Fri May 19 13:39:21 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 has-unit-tests needs-patch  |     Focuses:  rest-api
---------------------------------------------------+-----------------------

Comment (by youknowriad):

 Worth noting that we're feeling the need for these date handling utilities
 in the Gutenberg project. (see this WIP PR)
 https://github.com/WordPress/gutenberg/pull/841

  - Do you think we should make the localized moment instance available?
 `const { moment } = wp.date;`? moment have several utilities that could be
 helpful without using the higher level API proposed here.

  - Do you think we should expose the local and the timezone in JS?
 (related to WP_Locale in
 https://core.trac.wordpress.org/ticket/39222#comment:17)

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


More information about the wp-trac mailing list