Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export server-side date format for use in JS by Moment.js #2013

Closed
westonruter opened this issue Jul 25, 2017 · 1 comment
Closed

Export server-side date format for use in JS by Moment.js #2013

westonruter opened this issue Jul 25, 2017 · 1 comment

Comments

@westonruter
Copy link
Member

westonruter commented Jul 25, 2017

See #1992 (comment)

It'd be nice to use _wpDateSettings.formats.date but PHP and moment.js tokens don't match.

So part of this would be a JS finction to convert the PHP date() format into the Moment.js format.

This is needed by both the Latest Posts block and the Latest Comments block.

@youknowriad
Copy link
Contributor

youknowriad commented Aug 2, 2017

I think the date module already provides utilities to do this.

@mtias mtias closed this as completed Nov 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants