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

Set DateTimeFormatter pattern to null by default #2

Closed
wants to merge 1 commit into from
Closed

Set DateTimeFormatter pattern to null by default #2

wants to merge 1 commit into from

Conversation

voronkovich
Copy link
Contributor

DateTimeFormatter returns an empty string when '' set as a pattern.

@sandermarechal
Copy link
Member

@voronkovich I cannot reproduce that the formatter returns an empty string when '' is set as the pattern. See https://3v4l.org/I09jm for a quick test. It always returns the correctly formatted date.

Also, the PHP documentation indicates that an empty string should be the default value: http://php.net/manual/en/intldateformatter.create.php

Could you post an example? What other options did you set on the DateTimeType?

@voronkovich
Copy link
Contributor Author

@sandermarechal, there was a strange bug in my code. Sorry for confusing you! So, closing this PR.

@voronkovich voronkovich closed this Jan 4, 2017
@sandermarechal
Copy link
Member

Ok, thanks for clearing that up

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

Successfully merging this pull request may close these issues.

2 participants