Workaround for createFromFormat on PHP > 5.2 #79

merged 1 commit into from Feb 17, 2014


None yet

2 participants


Not sure if a new class extending DateTime is the better choice for this, but since DateTime::createFromFormat is only used on two files I think it works fine.

I haven't tested all the cases where it's used, but on those where I test seems to work. On this ( ) fiddle it seems to return the same output on all PHP versions > 5.2

WordPress REST API Team member

Thanks a bunch! 🍰

@rmccue rmccue merged commit 7a93039 into WP-API:master Feb 17, 2014

1 check failed

Details default The Travis CI build could not complete due to an error
@rmccue rmccue added this to the 0.9 milestone Feb 17, 2014
@rmccue rmccue added the Bug label Feb 17, 2014
@rmccue rmccue self-assigned this Feb 17, 2014
@osiux osiux deleted the osiux:issue-52 branch Feb 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment